How to enable autocorrect?

git config --global help.autocorrect delay

To enable autocorrection of git commands use git config --global help.autocorrect 20, where 20 is a 2 second delay before executing the suggested command. You can set a delay of your choice.

The --global flag will enable autocorrect for all your git repositories.

Inspired by Michael Kaufmann.

Layer 1
Terminal Example
git config --global help.autocorrect 20

git stats
WARNING: You called a Git command named 'stats', which does not exist.
Continuing in 2.0 seconds, assuming that you meant 'status'.
On branch main
nothing to commit, working tree clean

See git config to learn more about it.

Last modified on November 30, 2021.

You might also like