Unstage all merge conflicted files on a rebase operation
Occasionally when you are working on a number of different feature branches at the same time, you can get collisions that you would prefer to just git rebase --skip
, however, that particular commit also includes useful changes to other files. To get around this, you might find yourself manually doing a whole pile of git reset HEAD filename
. I'd recommend considering the following instead (assuming you genuinely don't want the changes), i.e. USE WITH CARE
git diff --name-status --diff-filter=U | cut -f2 | xargs git reset HEAD
git diff --name-status --diff-filter=M | cut -f2 | xargs git checkout --
Written by Damon Oehlman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#