What do the colors in the Github for Windows shell mean?

Tomas Aschan picture Tomas Aschan · May 23, 2013 · Viewed 11.8k times · Source

When "gitting" in Windows, I happily use the Github for Windows client, but since I do a lot of work in Linux as well I often end up in the shell when anything more complicated than committing or syncing has to be done. I really like the Posh-Git additions with colors and some info on the state of the tree, but I've been unable to find a good resource on what they all actually mean.

For example, the name of the current branch can be yellow, cyan, red and perhaps other colors as well. If there are local changes, there is a set of extra things (for example +0 ~1 -0) that are mostly displayed in dark red, but I think I've seen them in other colors as well (I don't know how to reproduce it though - since I don't know what the colors mean...)

Is there a summary somewhere on how to interpret the extra information that the colors and digits give?

Answer

dahlbyk picture dahlbyk · May 24, 2013

Colors are explained under The Prompt in the README shown at https://github.com/dahlbyk/posh-git/. To summarize:

  • Cyan means the branch matches its remote
  • Green means the branch is ahead of its remote (green light to push)
  • Red means the branch is behind its remote
  • Yellow means the branch is both ahead of and behind its remote

The +~-! status represents added/modified/removed/conflicted file count in your index (dark green) and/or working directory (dark red).