I want my git prompt in bash to colorize (green for clean repos, red for dirty repos). Right now, it shows plain white text no matter the git state of my cwd/repo.
Although there could be a problem in
Add this lines to file
Or, alternatively, change it with the
Optionally, leave out
Be sure git will use color with:
Using bash and with git installed from the up-to-date package (1.9.1-1).
Add the following to .bashrc and then restart bash:
You don't need to change your .bashrc file as in the link you posted. That file eventually will be sourced anyway.
See /etc/bash_completion /usr/share/bash-completion/bash_completion /etc/bash_completion.d/git-prompt and, more importantly, /usr/lib/git-core/git-sh-prompt on your system for comments that describe the uses of the above variables (and additional ones).
Changes in already tracked file cause the dirty displays--newly added ones don't. The describe part of the prompt is only displayed when on a detached HEAD.