我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:
git config --global core.excludesfile ~/.gitignore_global
是否有办法全局撤销此设置的创建?
我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:
git config --global core.excludesfile ~/.gitignore_global
是否有办法全局撤销此设置的创建?
当前回答
这将取消设置全局凭据帮助。
git config --global --unset credential.helper
其他回答
你可以使用git配置的——unset标志来这样做:
git config --global --unset user.name
git config --global --unset user.email
如果一个配置有多个变量,你可以使用:
git config --global --unset-all user.name
如果某人只想完全删除user对象,那么他应该使用:
git config --global --remove-section user
当用户像user一样不小心添加了更多不需要的属性时,这是非常有用的。密码等。
您可以使用检查所有配置设置
git config --global --list
您可以删除设置,例如username
git config --global --unset user.name
您可以手动编辑配置或删除配置设置,使用:
git config --global --edit
我不知道你说的“撤销”是什么意思。你可以去掉核心。排除这样的文件设置:
git config --global --unset core.excludesfile
当然,你可以简单地编辑配置文件:
git config --global --edit
...然后用手把设置去掉。
这将取消设置全局凭据帮助。
git config --global --unset credential.helper