Skip to content

Instantly share code, notes, and snippets.

@marando
Last active June 15, 2016 07:51
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 marando/df123e236f079c8b723ee40fd95f7486 to your computer and use it in GitHub Desktop.
Save marando/df123e236f079c8b723ee40fd95f7486 to your computer and use it in GitHub Desktop.
Enable Git Autocompletion

Enable Autocompletion for Git

  1. Download the git completions script.
$ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  1. Add the script to your ~/.bash_profile.
if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi
  1. Press tab after any git command and it will provide suggestions and branch names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment