git - 如何关闭 git 自动更正?

标签 git autocorrect

当我输入 git 命令时,例如输入 git git checkout myfile(注意多余的“git”),我得到以下输出:

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>]

因此 git 假定我指的是 init,并在错误继续之前给我全部 0.1 秒的时间来查看错误。不酷的 git!

如何关闭此“功能”?

最佳答案

要查看自动更正设置,请键入:

git config help.autocorrect

根据 the docs :

help.autocorrect 实际上是一个表示十分之一秒的整数。因此,如果您将其设置为 50,Git 将给您 5 秒的时间让您在执行自动更正命令之前改变主意。

要关闭它,使用命令:

git config --global help.autocorrect 0

关于git - 如何关闭 git 自动更正?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39708972/

相关文章:

git - 如何使用 SourceTree 更新我的 fork 存储库?

Windows 2003 服务器上的 git pull 非常慢(不是 ssh 传输部分)

git - 如何更改 git 中的特定字体颜色?

git - 如何让 Git 忽略空格和制表符?

ios - 是否可以在 Swift 上使用 iOS 自动更正库?

android - 机器学习算法 Android 拼写检查和自动更正

github:你将如何删除某个用户名的所有提交

excel - 如何全局停止Excel日期自动格式化

iphone - UITapGestureRecognizer 和自动校正

iOS: "Message sent to deallocated instance"当在 UITextView 上显示其自动更正弹出窗口时退出第一响应者