Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: merge branch and accept HEAD for all conflicts

Is it possible to merge a branch into a current branch in git and accept HEAD for all merge conflicts? Basically this says I know what I'm doing and don't care what's in the other branch I'm merging in, accept everything from HEAD of the current branch and do not complain about merge conflicts.

like image 982
randombits Avatar asked Oct 27 '25 02:10

randombits


1 Answers

From the documentation for git merge:

$ git merge -s ours <branch name>
like image 145
Mike Daniels Avatar answered Oct 28 '25 18:10

Mike Daniels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!