Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ML with Xcode installed tools (git coming from there).

Later I've installed brew and install bash-completion, but git commands still not auto-completed.

Brew has no such package. Google does not helped. How I can enable git completion support in Mountain Lion?

share|improve this question
Answers containing just links will automatically be converted to comments. The way it's now is fine. Cheers! – slhck Sep 18 '12 at 9:50
questions like these really belong on ask different, the apple stack exchange site, at – JamiePatt Sep 18 '12 at 11:08


I've found solution here: and it works well.

I got that by using curl from the URL here:

curl -o ~/.git-completion.bash

Then I added to my ~/.bash_profile file the following "execute if it exists" code:

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

share|improve this answer
+1 - Don't reply to this comment, I will delete it but that is a good answer! – Dave Sep 18 '12 at 9:41
That should be -o ~/.git-completion.bash instead of -o /.git-completion.bash – obvio171 Nov 16 '12 at 16:46
Also, there needs to be a ; before the fi – SooDesuNe Mar 14 '13 at 20:23
I would suggest changing the URL to‌​etion.bash in order to grab the completion script matching ML's Git version ( – Slipp D. Thompson Jul 29 '14 at 2:00
Strangely, a Zero Width Non-Joiner character (U+200C) got inserted in the middle of the URL in my last comment. Try the URL of this link instead: github/git/git/v1.8.5.2/contrib/completion/git-completion.bash. – Slipp D. Thompson Jul 29 '14 at 2:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.