Created
December 11, 2025 18:32
-
-
Save jaykava/eb0160952d57f3d780dc2ed986f523eb to your computer and use it in GitHub Desktop.
git branch display on ubuntu terminal add this on .bashrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/\ \(\1\)/p' | |
| } | |
| export PS1="\\[\\e[0;32m\\]\\u@\\h\\[\\e[m\\]:\\[\\e[0;34m\\]\\w\\[\\e[m\\]\\[\\e[0;33m\\]\$(parse_git_branch)\\[\\e[m\\]\\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment