我正在关注 GIT 的官方指南,实际上我在 2.2.6 段落“提交您的更改” 以前,在第 1.5.1 节“身份”中,当被要求输入如下命令时
git config --global user.name "John Doe"
我错过了 --global 选项,因为我不需要它。 现在每次我做一个 git commit,我都会得到
$git commit
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
但我不想输入 --global 选项,是否存在其他方式?
最佳答案
如果您只想为该存储库设置它,请运行:
git config user.email "you@example.com"
git config user.name "Your Name"
关于git 提交和用户身份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15392575/