5

I've tried using:

Though the output from git push on error is all white. Everything in my ZSH is colored and this looks ugly & becomes harder to parse as everything else has color.

1 Answer 1

2

Sorry to say, but it looks like support for this just isn't built in to git at the moment... Comparing this:

https://github.com/git/git/blob/master/builtin/push.c

with this:

https://github.com/git/git/blob/master/builtin/log.c

You'll see that the latter has various references to color (starting with including color.h), and the former does not. That could be a starting point for you or someone to modify the git source (and submit a pull request or similar) to have this functionality.

I'm not sure why you're not having success with stderred, though; git push does, I've just confirmed, send its output to stream 2 (stderr), so it seems like it ought to work, provided that it's working for other utilities.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .