Book Image

Git Version Control Cookbook

Book Image

Git Version Control Cookbook

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Autocompletion


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.

Linux

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.

Mac

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.

Windows

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