How to merge a branch into another with override option in git

I use git and I have two branches: production and master. At this time, production is 9 months, and many changes have passed into the main industry.

I use capistrano, so I need to push all the changes in the production branch so that I can deploy. However, when I merge, I get tons of merge conflicts. I am not interested in the merge problem because I want my production branch to be redefined by the master branch. Is there any way to do this.

If I had not thought about creating a production branch called production_old. Then delete everything in the production branch, and then merge from the wizard.

I am using github.

+3
source share
2 answers

: github. ...

, . , , (production), , , (master), master production.

, , , , .

  • production, .
  • production, master.

, β„–2, git branch -f production master, production, master . production , -f. git checkout production, git reset --hard master, master.

, production, - , , , .

+1

Source: https://habr.com/ru/post/1725959/


All Articles