git-cheat-sheet icon indicating copy to clipboard operation
git-cheat-sheet copied to clipboard

Bash prompt works with newest git and shows branch only when found

Open specious opened this issue 7 years ago • 2 comments
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.

specious avatar Dec 28 '17 22:12 specious

Doesn't work in zsh.

su8 avatar Apr 03 '18 18:04 su8

oh-my-zsh makes it extremely easy to install a zsh prompt with git integration. Here's one that I made called bender.

Did it work with zsh before this change?

specious avatar Jul 29 '18 23:07 specious