Answer the question
In order to leave comments, you need to log in
How to upload the content of another branch to the master, avoiding all conflicts?
There are two branches: master and feature. feature is significantly ahead of master in terms of commits, and with a normal merge, a huge number of conflicts arise, which there is no desire to fix on your own, how can you forcefully push changes to the feature branch into the master branch in such a way that the master content is of no interest?
Answer the question
In order to leave comments, you need to log in
This is, of course, a strange situation, but it happens, so it's best to simulate a merge, where the contents of one branch will be completely replaced by another:
git checkout master
git commit-tree -p master -p feature -m "Overriding master with feature" feature^{tree}
12346aa23590aa
git merge --ff 12346aa23590aa
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question