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

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

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


当前回答

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

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

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

其他回答

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

git config --global --list

您可以删除设置,例如username

git config --global --unset user.name

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

git config --global --edit 

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

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

git config --global --unset credential.helper

我不知道你说的“撤销”是什么意思。你可以去掉核心。排除这样的文件设置:

git config --global --unset core.excludesfile

当然,你可以简单地编辑配置文件:

git config --global --edit

...然后用手把设置去掉。

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

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

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