Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

Here's a quick TIL: I just watched one of our weekly team calls and my new colleague Tilde shared that Git has an auto correct feature. Very useful. ๐Ÿ‘Œ

Two terminal windows: one showing git complaining about an unknown command `stats` and another one automatically fixing the command

For now I'm running with the following config which gives me four seconds of time to cancel if the correction is not what I want.

 [help]
     autocorrect = 40

If you want to learn more have a look at the git docs.

Starting with git 2.34 autocorrect provides a new prompt configuration. The autocorrect options are now:

  • never โ€“ don't autocorrect (not helpful)
  • immediate โ€“ autocorrect automatically (too much)
  • 40 โ€“ autocorrect after a delay (doesn't feel right)
  • prompt โ€“ ask if autocorrection should be applied (just perfect!)
If you enjoyed this article...

Join 5.2k readers and learn something new every week with Web Weekly.

Web Weekly โ€” Your friendly Web Dev newsletter
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles