Last Updated: September 09, 2019
·
2.379K
· davefp

Get yourself some git completion on OSX

Git has some really nice autocomplete features, but they're not installed by default in OSX. For shame!

Fix this by grabbing this shell script:

curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

Then load it in your bash profile:

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

Bam! Now you have auto-complete for git commands and branch names.

Sourced from this handy blog post: http://code-worrier.com/blog/autocomplete-git/

2 Responses
Add your response

Why don't you use Oh My Zsh? It provides git auto-complete, git alias and a very good bunch of plugins.

https://github.com/robbyrussell/oh-my-zsh

over 1 year ago ·

My zsh also breaks cURL and some other very useful features and hides away the stuff it overwrites, no transparency.

over 1 year ago ·