创建repo server 仓库

1. 创建一个有意义git 仓库;例如 autoltp.git 
2. sudo mkdir /srv/manifest.git 
3. sudo git init --bare /srv/manifest.git 
4. sudo chown -R git:git /srv/manifest.git 
////////下面是在客户端PC上的操作
5. cd /home/aouyang/work/
6. mkdir repotest
7. cd repotest
8. git clone [email protected]:/srv/manifest.git 
9. cd manifest
10. touch default.xml 


   
   
   


remote: name 服务器名字(随意)  fetch 仓库的相对路径
当前manifest仓库/srv/manifest.git   autoltp仓库/srv/autoltp.git;则fetch 相对于/srv/的路径
default: 默认获取的版本, project未指定revision时使用
project:path指定克隆到本地的相对路径; name指定仓库名
综上仓库为/srv/autoltp 
11. git add default.xml  git commit  git push origin:HEAD/master
12. cd /home/aouyang/work/repotest
13. repo init -u [email protected]:/srv/manifest.git 
14. repo sync 
15. cd autolt 
16. pwd
/home/aouyang/work/manifesttest/autolt

你可能感兴趣的:(创建repo server 仓库)