Added git auto complete for git commands ,keywords and branch-names. #18

wants to merge 1 commit into


None yet

6 participants


For example if you type "git ch" and then press tab you will get three choices
checkout cherry cherry-pick

if you type "git checkout" and then press tab you will get
FETCH_HEAD HEAD ORIG_HEAD master origin/HEAD origin/master

(In this case I had only branch master)

ProLoser commented Aug 1, 2012


richo commented Aug 1, 2012

This is pretty amazingly targeted, is it really general enough to warrant going into this project?

renstrom commented Aug 8, 2012

Why not just use bash-completion (installed via Homebrew) instead of sourcing git-completion? Installing Git via Homebrew actually already installs git-completion.bash for use in bash-completion.


@renstrom Interesting! This would boil down to adding a conditional source $(brew --prefix)/etc/bash_completion to .bash_profile.

renstrom commented Aug 8, 2012


Might want to consider a conditional though since most non-osx systems install bash-completion to /usr/share/bash-completion/bash_completion.

hkdobrev commented Aug 5, 2013

I think this is pretty useful. Actually full-time usage of git from command line is quite hard without it.

When I installed git via brew it added the completion file to /usr/local/etc/bash_completion.d.

The 'contrib' directory has been installed to:

Bash completion has been installed to:

zsh completion has been installed to:

I think /usr/share is used by default from the make installer. But since git is installed via .brew in these dotfiles it would be better to use the location which brew uses.

@bennewton999 bennewton999 pushed a commit to bennewton999/dotfiles that referenced this pull request Jan 13, 2014
@sapid @cowboy sapid + cowboy Fixed minor typo. Closes gh-18. da5a78e

This is now fixed. Thanks for the suggestion + discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment