How to disable git autocorrect?

When I seal a git command, for example by typing git git checkout myfile(note the optional "git"), I get the following output:

WARNING: You called a Git command named 'git', which does not exist.
Continuing under the assumption that you meant 'init'
in 0.1 seconds automatically...
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]

So git assumes that I had in mind init, and gives me just 0.1 seconds to see the error before it moves forward. Not cool git!

How to disable this feature?

+4
source share
2 answers

To see the AutoCorrect setting, type:

git config help.autocorrect

Per docs :

help.autocorrect is actually an integer that represents tenths of a second. Therefore, if you set it to 50, Git will give you 5 seconds to change your mind before executing the auto-correction command.

, :

git config --global help.autocorrect 0

+3

help.autocorrect 0.

, 1: deciseconds, 10 1 , 30 - 3 ..

, Git 2.14, .
. commit 968b1fe (21 2017 .) Marc Branchaud (`` ).
( Junio ​​C Hamano - gitster - aca226e, 26 2017 )

, help.autoCorrect = 15:

WARNING: You called a Git command named 'lgo', which does not exist.
   Continuing under the assumption that you meant 'log'
   in 1.5 seconds automatically...

:

WARNING: You called a Git command named 'lgo', which does not exist.
Continuing in 1.5 seconds, assuming that you meant 'log'.
0

Source: https://habr.com/ru/post/1655866/


All Articles