如何使用git config删除全局配置中的条目? [英] How can I remove an entry in global configuration with git config?

查看:2068
本文介绍了如何使用git config删除全局配置中的条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I ran a global configuration command in git to exclude certain files using a .gitignore_global file:

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

是否有办法在全局范围内撤消此设置的创建?

Is there a way to undo the creation of this setting globally?

推荐答案

我不确定撤消更改的意思。你可以像这样删除 core.excludesfile 设置:

I'm not sure what you mean by "undo" the change. You can remove the core.excludesfile setting like this:

git config --global --unset core.excludesfile

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

And of course you can simply edit the config file:

git config --global --edit

...然后手动删除设置。

...and then remove the setting by hand.

这篇关于如何使用git config删除全局配置中的条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆