Created
July 31, 2016 06:17
-
-
Save itsnwa/5a918fc86e4720fc5c23f68c36dfa6d1 to your computer and use it in GitHub Desktop.
Show working directory and git branch in terminal prompt
This file contains 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
# Load in the git branch prompt script. | |
source ~/.git-prompt.sh | |
export PS1="[\W\$(__git_ps1)]\[\033[00m\]\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download script:
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh