git-cheat-sheet
git-cheat-sheet copied to clipboard
Bash prompt works with newest git and shows branch only when found
trafficstars
I was inspired by your cheatsheet and made some improvements to the bash prompt definition while working on my own bash prompt with git integration.
Now it detects presence of git and doesn't show the branch unless you're in a git repository. The verbatim output of git status must have changed at some point, because now it says nothing to commit, working tree clean.
Doesn't work in zsh.