Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when hitting Tab? Like other CLI commands do.

P.S. I'm using Arch Linux, if that anyhow matters.

share|improve this question
What shell are you using? Bash? – nsg Aug 13 '12 at 9:13
Yes, Bash. Sorry for not mentioning that. – daGrevis Aug 13 '12 at 9:29
You have this file /etc/bash_completion.d/git or not, it belongs to core/git – warl0ck Aug 13 '12 at 11:37
up vote 10 down vote accepted

Add source /usr/share/git/completion/git-completion.bash to your ~/.bashrc.


  1. Arch Linux Wiki
share|improve this answer

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.