Reputation: 3238
I have an local branch say my_local, I have commits few changes & push to server but still not merge with master branch. Now I have few more changes to push from same branch but I wanted to do pull & merge with master.
I simply follow:
But this is showing all master-branch new changes as modified in my local branch. What is wrong in that, anything I'm missing ?
Please suggest !
Upvotes: 1
Views: 2823
Reputation: 27
Upvotes: 1
Reputation: 32376
This is very common scenario. you do follow below steps:-
git stash
.git checkout master
.git pull origin master
.git checkout your_local_branch
.git stash pop
.Hope these steps are clear and let me know if you need any other info.
Upvotes: 1
Reputation: 628
You can use git rebase
git fetch origin
git rebase origin/master
Upvotes: 1