HELPME
HELPME

Reputation: 754

How to get files from another branch into my current branch?

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

Answers (2)

Carrot Cake
Carrot Cake

Reputation: 57

Try mergin branches.

git pull --all

git checkout branch2

git merge branch1

You might need to resolve some merge conflicts

Upvotes: 1

avolkmann
avolkmann

Reputation: 3105

I frequently use this to pull from master into a working branch. git pull origin branch1

Upvotes: 1

Related Questions