Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolve merge conflicts on pull using my changes

Tags:

git

I want to pull a project and resolve merge conflicts using my changes. How can I do this?

like image 639
Mass Avatar asked Nov 05 '12 16:11

Mass


1 Answers

Use the recursive merge strategy with the ours option:

git merge -s recursive -X ours branch_to_merge 

or

git pull -s recursive -X ours 

For any conflicts, it will use the hunk that comes from your branch. See the git merge man page for more details.

like image 74
jbowes Avatar answered Sep 23 '22 14:09

jbowes