Book Image

Git Version Control Cookbook

By : Aske Olsson, Rasmus Voss
Book Image

Git Version Control Cookbook

By: Aske Olsson, Rasmus Voss

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
About the Authors
About the Reviewers


Git comes with built-in support for auto-completion of Git commands for the bash and zsh shells. So if you use either of these shells, you can enable the auto-completion feature and let the <tab> option help you complete commands.

Getting ready

Generally, the auto-completion feature is distributed with the Git installation, but it is not enabled by default on all platforms or distributions. To enable it, we need to find the git-completion.bash file distributed/installed with the Git installation.


For Linux users, the location may vary depending on the distribution. Generally, the file can be found at /etc/bash_completion.d/git-completion.bash.


For mac users, it can generally be found at /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash.

If you installed Git from Homebrew, it can be found at /usr/local/Cellar/git/1.9.1/etc/bash_completion.d/git-completion.bash.


With the Msysgit installation on Windows, the completion functions are already...