Skip to content

Instantly share code, notes, and snippets.

@tschaub
Created May 18, 2012 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tschaub/2722957 to your computer and use it in GitHub Desktop.
Save tschaub/2722957 to your computer and use it in GitHub Desktop.
Git autocomplete and branch in PS1
# Set git autocompletion and PS1 integration
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
. /usr/local/git/contrib/completion/git-completion.bash
fi
PS1="\h:\W\$(__git_ps1)$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment