1

This is a rebound of How to colorize output of git?

I want to colorize any conflicts in the git output of merge/rebase/patch/am commands.

Applying: CH10: Stub file added with notes copied from video recording lessons.
Applying: TOC: Adding Chapter 10 to the book build.
Using index info to reconstruct a base tree...
M   book.asciidoc
Falling back to patching base and 3-way merge...
Auto-merging book.asciidoc
CONFLICT (content): Merge conflict in book.asciidoc
Recorded preimage for 'book.asciidoc'
Failed to merge in the changes.
Patch failed at 0002 TOC: Adding Chapter 10 to the book build.
The copy of the patch that failed is found in:
   /Users/emmajane/Git/1234000002182/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

It will be very helpful if CONFLICT is in some other color that I can stop easily

  • 2
  • Not really a U&L question; more apt for SO. – DopeGhoti Aug 30 '17 at 16:25
  • 1
    @DopeGhoti Well, it's a question about "Applications packaged in *nix distributions" so I think it's on-topic here. I suspect OP would find more experts on Stack Overflow, but it's up to OP to pick from all the sites his/her question is on-topic. – derobert Aug 30 '17 at 18:12
  • are you looking for a native git solution, or an external (grep with color) method? – Jeff Schaller Aug 30 '17 at 18:29
  • Something more concrete from native git. I did not find any color for the conflict errors in the actual git color help pages. I can try one of the solutions mentioned in stackoverflow.com/questions/9686316/… by @derobert – Pratyush Aug 31 '17 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.