How to Configure Autocorrect (Git)

Reginald LynchNovember 26th 2020, 5:58

This configuration is useful when you get tired of messages such as the following one just because you made a typo on the keyboard:

git statis

By setting the configuration to help.autocorrect, you can control how Git will behave when you accidentally send a typo to it. By default, the value is 0 and it means to list the possible options similar to the input (if statisis given, status will be shown). A negative value means to immediately execute the corresponding command. A positive value means to wait the given number of deciseconds (0.1 sec) before running the command (so there is an amount of time in which to cancel it). If several commands can be deduced from the text entered, nothing will happen. Setting the value to half a second gives you some time to cancel a wrong command, as follows:

git config help.autocorrect 5

git statis