0

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.

1 Answer 1

2

git pull origin D is enough. This will fetch and merge branch D into your current branch.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.