-4

I've 2 branches,like master and demo. I want to merge demo code in to master so please help me to solve this issue. Branches 1 Master 2 demo

Aman vijay
  • 15
  • 1
  • 1

2 Answers2

4

git checkout Master

git merge demo

resolve conflicts, assuming all branches are up to date and local

(Will add more detail, just to be complete, if you are using online repo)

git checkout demo

git pull (now demo is updated locally)

git checkout Master

git pull (now Master is updated locally)

git merge demo

resolve any conflicts, which can be done through android studio as well, VCS -> Git -> Resolve Conflicts

a_local_nobody
  • 7,947
  • 5
  • 29
  • 51
1

I'm assuming two branches master and demo.Merge Master code to demo

Step 1
A.go to the master->git checkout Master. B.pull all the new changes from Master branch.

Step 2
A. now got to demo branch->git checkout demo

Step 3
A.merge the changes of Master branch into Demo branch git merge Master B.Then push your updated code to git git push origin demo.

Sumit Kumawat
  • 127
  • 10