原文在此,有图解。 http://www.gitguys.com/topics/tracking-branches-and-remote-tracking-branches/ 另一文: http://gitready.com/beginner/2009/03/09/remote-tracking-branches.html
大概意思就是: -------------------------------------------------- Remote Tracking Branches是和远程做关联的分支,本地用户只读,不能更改。 它从远程获取内容,fetch的时候,实际就是更新到Remote Tracking Branches分支里, 然后你merge的时候,就把它和你的master、dev之类的分支合并了。 pull的话,就是fetch+merge两步合一步执行。
Tracking Branches其实就是指你的master、dev等分支。
原文总结在此: ------------------------------------------------------ Below is a high-level summary of tracking branches and remote tracking branches. The rest of this page gives examples of tracking and remote tracking branches in action. --------------------------- Tracking Branches – the high level summary: --------------------------- (1)Tracking Branches get their contents from the git clone, git pull and git merge commands (git fetch updates only the remote tracking branch). (2)Tracking branches can be modified by users. (3)After the user does a git commit in the local tracking branch, users can then use git push to publish changes from their tracking branch to the remote repository and remote tracking branches.
--------------------------- Remote Tracking Branches – the high level summary: --------------------------- (1)Remote Tracking Branches get their contents from the git clone, git pull and git fetch commands (git merge updates only the tracking branch). (2)Remote Tracking Branches should not be modified by users (don’t set your git branch to a remote tracking branch via git checkout and then try to modify the remote tracking branch). (3)Remote Tracking Branches get their contents from the remote repository.
|