What is the difference between branch-0.2 and origin/branch-0.2 in Git?
I cloned开发者_如何学运维 a Git repository and when I do a 'git checkout' I see branch-0.2 and origin/branch-0.2 in the list of the branches. What is the difference between the two branches? I read a couple of articles, but I'm not clear on what the difference is.
origin/branch-0.2
is the local reference to branch-0.2
in the remote named origin
. It is also called a remote-tracking branch. You can synchronise it (for manual merging later using git merge
) with the remote by running: git fetch origin branch-0.2
. In order to fetch and merge at the same time, you can use: git pull origin branch-0.2
.
精彩评论