GIT Tip: Autocorrect

A neat trick to configure GIT to automatically correct your typos. Let say that you want to check the status of your repository and wrote:

git stats

You will get the following error:

git: ‘stats’ is not a git command. See ‘git –help’.
Did you mean this? status

If there is only one command GIT can run that command automatically by setting the configuration:

git config –global help.autocorrect 1

You can change it back to normal by writing

git config –global help.autocorrect 0

* Works with GIT > 1.6.1