Quantcast
Viewing all articles
Browse latest Browse all 40

Adding git status to the bash prompt

After talking to a friend of mine Jeff Larkin about bash prompts, I decided to modify what he did into a single line bash prompt.  By adding the following to your .bashrc you’ll get the branch your on in git (if current directory is tracked), a color denoting the status of the branch as well as the return code of the last command (if non-zero)

Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 40

Trending Articles