跟踪关系示例
$ git branch -u origin/master
分支 master 设置为跟踪来自 origin 的远程分支 master。
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = http://192.168.3.18:3100/xx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin0"]
url = http://one.com:3100/xx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin0/*
$ git branch -vv
* master 9b71642 [origin/master] 读取autogit
$ git branch -u origin0/master
分支 master 设置为跟踪来自 origin0 的远程分支 master。
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = http://192.168.3.18:3100/xx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin0
merge = refs/heads/master
[remote "origin0"]
url = http://one.com:3100/xx/xxx.git
fetch = +refs/heads/*:refs/remotes/origin0/*
$ git branch -vv
* master 9b71642 [origin0/master] 读取autogit