Skip to content

Instantly share code, notes, and snippets.

@einaralex
Created May 18, 2014 16:32
Show Gist options
  • Save einaralex/324ff4e4830664e5f8e9 to your computer and use it in GitHub Desktop.
Save einaralex/324ff4e4830664e5f8e9 to your computer and use it in GitHub Desktop.
Git branch name autocompletion OSX
Grab git-completion.bash (https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash)
and save it to /Users/YourUser/.git_completion.bash
Then in your ~/.bashrc file, add
source $HOME/.git_completion.bash
Then in your shell, pickup the changes:
source ~/.bashrc
If this doesn't work off the bat, you may need to run
chmod -X ~/.git-completion.bash
to give the script permission to run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment