Resolve Git merge conflicts in favor of their changes during a pull
git, git-merge, git-merge-conflict
Solution
If you're already in conflicted state, and do not want to checkout path one by one. You may try
git merge --abort
git pull -X theirs
Problem
How do I resolve a git merge conflict in favor of pulled changes? I want to remove all conflicting changes from a working tree without having to go through all of the conflicts with `git mergetool`, while keeping all conflict-free changes. Preferably, I want to do this while pulling, not afterwards.
Related problems
- What's the difference between `git add .` and `git add -u`?
- In plain English, what does "git reset" do?
- git checkout --ours does not remove files from unmerged files list
- Resolve conflicts using remote changes when pulling from Git remote
- What is the difference between 'git pull' and 'git fetch'?
- Is there a "theirs" version of "git merge -s ours"?