相关疑难解决方法(0)

git提交为不同的用户,没有电子邮件/或只有电子邮件

我试图作为不同的用户提交一些更改,但我没有有效的电子邮件地址,以下命令对我不起作用:

git commit --author="john doe" -m "some fix"
fatal: No existing author found with 'john doe'
Run Code Online (Sandbox Code Playgroud)

尝试仅使用电子邮件地址提交时遇到同样的问题

git commit --author="john@doe.com" -m "some fix"
fatal: No existing author found with 'john@doe.com'
Run Code Online (Sandbox Code Playgroud)

在commit命令的git手册页上,它说我可以使用

standard A U Thor <author@example.com> format
Run Code Online (Sandbox Code Playgroud)

对于--author选项.

这种格式在哪里定义?A和U代表什么?我如何仅使用用户名或仅使用电子邮件为不同的用户提交?

git commit

112
推荐指数
7
解决办法
11万
查看次数

标签 统计

commit ×1

git ×1