Skip to content

Instantly share code, notes, and snippets.

@henriquegogo
Last active August 29, 2015 14:01
Show Gist options
  • Save henriquegogo/1baa7569c0fb78f8c144 to your computer and use it in GitHub Desktop.
Save henriquegogo/1baa7569c0fb78f8c144 to your computer and use it in GitHub Desktop.
Show git branch on commandline path
# Download this file https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh to ~/.git-prompt.sh
source ~/.git-prompt.sh
export PS1='\[\e[1;33m\]'$PS1'\[\e[1;32m\]$(__git_ps1 "(%s) ")\[\e[m\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment