最佳答案
我试着这样做:
git commit --author='Paul Draper <my@email.org>' -m 'My commit message'
但我得到了:
*** 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.
我可以设置它们,但是我在一个共享的盒子上,我必须(想)事后取消它们:
git config user.name 'Paul Draper'
git config user.email 'my@email.org'
git commit -m 'My commit message'
git config --unset user.name
git config --unset user.email
一个 commit
台词也太多了吧!
有捷径吗?