我在git中运行了一个全局配置命令,使用.gitignore_global文件排除某些文件:
git config --global core.excludesfile ~/.gitignore_global
是否有办法全局撤销此设置的创建?
我在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 --edit
按Insert并删除设置
最后输入:wq并按“Enter”保存。
尝试这些命令删除所有用户的用户名和电子邮件。
git config --global --unset-all user.name
git config --global --unset-all user.email
您可以使用检查所有配置设置
git config --global --list
您可以删除设置,例如username
git config --global --unset user.name
您可以手动编辑配置或删除配置设置,使用:
git config --global --edit
为了补充larsk应答器,可以在使用vim编辑时使用dd命令删除一个输入行:
git config --global --edit
然后:
按“Esc”键进入正常模式。 将光标放在要删除的行上。 输入dd并按Enter删除该行。
完成后,键入ESQ和:wq
您可以编辑~/。Gitconfig文件在您的主文件夹。这是保存所有全局设置的地方。