Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer

You must log in to answer this question.

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