There are a zillion questions about this all over teh internet but I just can't seem to find an easy enough answer to grasp and wrap my head around. The difference in how push/pull can be a bit confusing.
When using git pull/push it is possible to push from a local branch A to the remote branch B using git push origin A:B
. This much is clear.
If I'm on branch C locally and wish to get content from remote branch D, is it enough to do git pull origin D
?
Or would I have to do something like git pull origin C:D (or D:C)
?
I've tried to read the man pages on how pull works in between branches but I haven't been able to solidly understand it so I'm asking you.
Cheers.
git pull origin D is enough. This will fetch and merge branch D into your current branch.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.