我对要提交的暂存系统进行了一些更改。 这是一个共享系统,所以我不想在配置中添加我自己的用户。 当我尝试像那样提交时,显然我得到:
*** 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.
我不想这样做。
当我尝试这个
git commit -c author.name="username" author.email="user@domain.com"
我明白
fatal: could not lookup commit author.name=username
当我尝试
git commit --author "user <user@domain.com>" -m "Some text"
我明白
*** 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.
如何提交更改?
答案 0 :(得分:1)
来自 git commit --help
的文档
--author=
覆盖提交作者。使用标准 A U Thor
在我自己的 repo 中尝试 git rev-list --all -i --author=""
后,我有一些提交,这意味着可能
git commit --author="" -m "fix"
应该可以工作,除非您的存储库根本没有提交
答案 1 :(得分:1)
试试这个,
git -c user.name='Chaz' -c user.email='chaz@email.org' commit -m '...'
这来自这里,但我想你们俩都在努力实现同样的目标。
参考this