Reputation: 754
here is a situation:
I was on branch1
and pushed my changes. Then I did second task on branch2
and pushed it too. After, I switched again to a branch1
and added some code into it, pushed again. Now I'm in branch2
again and do not have last changes which was made in branch1
.
How can I do it?
Upvotes: 1
Views: 43
Reputation: 57
Try mergin branches.
git pull --all
git checkout branch2
git merge branch1
You might need to resolve some merge conflicts
Upvotes: 1
Reputation: 3105
I frequently use this to pull from master into a working branch.
git pull origin branch1
Upvotes: 1