Git completion and zsh

I use zsh out of habit and reasons highlighted here.

One problem I had with zsh was Git completion. git-completion.bash is the script that handles the completion. Place it in your home directory and source it in your .bashrc/.zshrc:

Although this didn’t work for zsh users. Fix this by using the git-completion.zsh, placing it into


and sourcing it

fpath=(~/.zsh $fpath)

in .zshrc.

If you have any problems with this, check out oh-my-zsh, an OS X fork of zsh which includes neat things like git completion, git colours, and prompt features that help with command line git, such as working branch, RVM environment, dirty/clean branch indicator etc.

Although, keep in mind that one complaint many people have with oh-my-zsh is that it is bloated.