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 git@10.22.52.217:/srv/manifest.git
9. cd manifest
10. touch default.xml
<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<remote name="SVR86" fetch="." />
<default remote="SVR86" revision="master" />
<project path="autolt" name="autoltp" revision="master"/>
</manifest>
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 git@10.22.52.217:/srv/manifest.git
14. repo sync
15. cd autolt
16. pwd
/home/aouyang/work/manifesttest/autolt