我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:

git config --global core.excludesfile ~/.gitignore_global

是否有办法全局撤销此设置的创建?


当前回答

这将取消设置全局凭据帮助。

git config --global --unset credential.helper

其他回答

这将取消设置全局凭据帮助。

git config --global --unset credential.helper

您可以使用检查所有配置设置

git config --global --list

您可以删除设置,例如username

git config --global --unset user.name

您可以手动编辑配置或删除配置设置,使用:

git config --global --edit 

打开配置文件编辑:

git config --global --edit

按Insert并删除设置

最后输入:wq并按“Enter”保存。

尝试从命令行更改git配置细节。

git config --global --replace-all user.name "Your New Name"

git config --global --replace-all user.email "Your new email"

您可以编辑~/。Gitconfig文件在您的主文件夹。这是保存所有全局设置的地方。