Steve Losh: A Guide to Branching in Mercurial -
Mercurial will push/pull all branches by default, while git will push/pull only the current branch.
I wonder if my understanding is right:
It occurs to me that when I do a git pull
I actually do fetch
from all branches but the merge
happens only with the current branch that I am sitting on. This is very close to mercurial
where a pull
gets me everything from the remote; but does not merge
anything yet.
In mercurial
a push
sends everything, but an explicit update
is needed to merge things back. I am not quite sure on git'
behavior of the push
operation.
In Git, you have to pull/push all the branches one by one. Thus, you can work on local branches without messing up the server.
You can specify each time which branch you want to pull/push on : git push origin master
means you want to push your branch master on the one at origin, which is often the "default" server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With