manju manju - 4 years ago 101
Git Question

How to do git pull from remote when you are in another local branch?

I have two branches in local say A and B, I committed some changes in A as well as B. I push modifications of A to my remote brach say A. now i need pull from my remote branch to my local branch B . How can i do it?

Answer Source
> git checkout A
> git pull 
> git checkout B
> git rebase A

Will merge all the changes from local branch A(incorporating changes from the remote repository1) to local branch B.

  1. https://git-scm.com/docs/git-pull
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download