How do I resolve a git merge conflict in favor of pulled changes ?
Basically I need to remove all conflicting changes from a working tree without having to go through all of the conflicts with a git mergetool
while keeping all conflict-free changes. Preferably doing this while pulling, not afterwards.
Git commands that can help resolve merge conflicts The status command is in frequent use when a working with Git and during a merge it will help identify conflicted files. Passing the --merge argument to the git log command will produce a log with a list of commits that conflict between the merging branches.
git pull -s recursive -X theirs <remoterepo or other repo>
Or, simply, for the default repository:
git pull -X theirs
If you're already in conflicted state...
git checkout --theirs path/to/file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With