Skip to content

Instantly share code, notes, and snippets.

@itsnwa
Created July 31, 2016 06:17
Show Gist options
  • Save itsnwa/5a918fc86e4720fc5c23f68c36dfa6d1 to your computer and use it in GitHub Desktop.
Save itsnwa/5a918fc86e4720fc5c23f68c36dfa6d1 to your computer and use it in GitHub Desktop.
Show working directory and git branch in terminal prompt
# Load in the git branch prompt script.
source ~/.git-prompt.sh
export PS1="[\W\$(__git_ps1)]\[\033[00m\]\$ "
@itsnwa
Copy link
Author

itsnwa commented Jan 24, 2017

Download script:
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment