Last active
October 5, 2015 17:18
-
-
Save gnepud/2843503 to your computer and use it in GitHub Desktop.
Show the current git branch in terminal
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
# Show the current git branch in terminal | |
COLOR_RESET="\e[0m" | |
RED="\e[1;31m" | |
YELLOW="\e[1;33m" | |
GREEN="\e[1;32m" | |
CYAN="\e[1;36m" | |
PS1="\[$YELLOW\]\u \[$COLOR_RESET\]at \[$CYAN\]\h \[$RED\]\W" | |
PS1+='$(__git_ps1 " \[$GREEN\](%s)") ' | |
PS1+="\[$COLOR_RESET\]\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment