Open kieranpotts opened 1 year ago
You get a lot of merge conflicts and want to quickly solve them using an editor and then add the conflicted files. Try this:
[alias] edit-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; vim `f`" add-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; git add `f`"
You should replace "vim" by your favorite editor.
Then just use
$ git edit-unmerged ... edit ... $ ... test ... $ git add-unmerged $ git commit # or git rebase --continue or whatever
Source: https://git.wiki.kernel.org/index.php/Aliases
To add all conflicting files at once:
git diff --name-only --diff-filter=U | uniq | xargs $EDITOR
You get a lot of merge conflicts and want to quickly solve them using an editor and then add the conflicted files. Try this:
You should replace "vim" by your favorite editor.
Then just use
Source: https://git.wiki.kernel.org/index.php/Aliases