This is Bash source for a Git prompt that shows you the status of your git repository every time you see the prompt.
- green = staged changes
- red = unstaged changes
- gray = untracked files
I've found this to be invaluable when working with Git, since you don't have
to type git status
(or gs
for those that made the alias) so often, and
don't have to spend the time reading through the output.
Either source git-ps1.sh
from your .bashrc
or copy and paste the contents.
(appended to .bashrc)
source /<path>/git-ps1.sh