使用建议的拼写错误更正

使用建议的拼写错误更正

我有这样的想法:

当您输入时

git glone https://repo.git

你得到

git: 'glone' is not a git command. See 'git --help'.

Did you mean this?
      clone

你怎么能自动接受这个改正建议呢?

答案1

您可以使用此全局设置:

git config --global help.autoCorrect -1

导致:

$ git glone http://repo.git
WARNING: You called a Git command named 'glone', which does not exist.
Continuing under the assumption that you meant 'clone'
Cloning into 'repo'...
...

相关内容