masterin small but numerous occasions. Manually fixing each would be repetitive. Even running
git checkout --theirs -- [filename]on each would be repetitive.
xargsto pass these into
git diff. We use the
catthe output for use in pipes.
git diffdoes what we want. However,
--checkalso flags whitespace markers for some reason, which can add noise, and it adds text after the filename, which must be split out (and I'm bad at
--diff-filteroption is more promising. With
--diff-filter=U, we only list unmerged files, and when rebasing, only conflicts are shown.
fppparses input and extracts path-like entities. This doesn't filter out non-conflicted diffs, but at least the filenames will be visually organized and sectioned like they are from
git status. Thus, our command becomes:
git checkout --conflict, which resets merge conflict markers in case you made a mistake and want to start the resolution from scratch.