1

We have two branches. staging and production, we made many changes in the branches including new files names. now I tried to git merge - but I get this error.

enter image description here

is there any command line in terminal to resolve the conflicts with replacing the production with staging?

Thank you

Community
  • 1
  • 1
AlmoDev
  • 969
  • 2
  • 18
  • 46

1 Answers1

0

IF you want to keep the past history of production, before replacing it with staging content, I would use a 2 step merge

git checkout staging
git merge --strategy=ours production
git checkout production
git merge staging
git push

That way:

  • the first merge changes nothing on staging
  • the second merge is a trivial one, with production HEAD simply moving (fast-forward) to staging HEAD
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250