我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:
git config --global core.excludesfile ~/.gitignore_global
是否有办法全局撤销此设置的创建?
我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:
git config --global core.excludesfile ~/.gitignore_global
是否有办法全局撤销此设置的创建?
当前回答
您可以编辑~/。Gitconfig文件在您的主文件夹。这是保存所有全局设置的地方。
其他回答
打开配置文件编辑:
git config --global --edit
按Insert并删除设置
最后输入:wq并按“Enter”保存。
Git配置信息将存储在~/中。Unix平台上的Gitconfig。
在Windows中,它将存储在C:/users/<NAME>/.gitconfig中。
您可以通过打开这些文件并删除您感兴趣的字段来手动编辑它。
尝试从命令行更改git配置细节。
git config --global --replace-all user.name "Your New Name"
git config --global --replace-all user.email "Your new email"
您可以编辑~/。Gitconfig文件在您的主文件夹。这是保存所有全局设置的地方。
你可以使用git配置的——unset标志来这样做:
git config --global --unset user.name
git config --global --unset user.email
如果一个配置有多个变量,你可以使用:
git config --global --unset-all user.name