I need to merge two branches in Git, but I have to be really careful regarding all files being merged. I need to keep some of them even if they are changed in second branch and sometimes I need to keep a part of them only. The easiest way would be to do a forced merge with mergetool for all files, not only those with conflicts. Is it possible?
Asked
Active
Viewed 166 times
0
-
This is pretty easy to do using the GUI on github – Josh Adams Jan 11 '18 at 13:38
-
1@JoshAdams This does not directly solve my problem, but you may add an answer describing this technique - maybe it will help others :) – Spook Jan 11 '18 at 13:38
-
sorry @spook Let me take some screenshots and upload to an answer :) give me some time. – Josh Adams Jan 11 '18 at 13:40
1 Answers
1
There's this answer How to prevent an automerge using git? that suggests to use a difftool on the two branches before even attepmting to merge. Commit the changes on all the files that you need. Then do a merge.

Nikolay Hüttenberend
- 1,288
- 8
- 17