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.
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
.