以下命令:
$git config --global --list
Run Code Online (Sandbox Code Playgroud)
给我:
user.name=test user
user.name=gotqn
Run Code Online (Sandbox Code Playgroud)
我想删除名字。我参考了这篇文章,做了以下命令,但没有任何结果:
git config --global --remove-section user.name='test user'
git config --global --remove-section user.name="test user"
git config --global --remove-section user.name=test user
git config --global --remove-section user.name
git config --global --remove-section test user
Run Code Online (Sandbox Code Playgroud)
我正在使用 Ubuntu 12.04 和
git version
Run Code Online (Sandbox Code Playgroud)
给我
git version 1.7.9.5
Run Code Online (Sandbox Code Playgroud)
请对此提供帮助,因为我想尝试使用 git 保存我的项目,但不想使用“测试用户”名称执行命令。
Mar*_*ppi 110
您可以编辑~/.gitconfig
主文件夹中的文件。这是--global
保存所有设置的地方。
小智 99
超级迟到的答案,但希望仍然有帮助:
git config --global --unset-all user.name
Run Code Online (Sandbox Code Playgroud)
然后你可以自由地:
git config --global --add user.name <whatever>
Run Code Online (Sandbox Code Playgroud)
Cru*_*der 10
git config --global --unset-all user.name
Run Code Online (Sandbox Code Playgroud)
或者您可以像这样更改用户名:
git config --global --replace-all user.name "New User Name"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
328623 次 |
最近记录: |