我以共享帐户登录,并希望以自己的身份快速提交一些更改。hg commit -u的git相当于什么?
与Mercurial我会与-u
标志
-u --user USER记录中指定的用户作为提交者
hg commit -u '[email protected]'
我试图
git commit --author='John Doe <[email protected]>'
做但没有帮助。
由于该帐户是共享的,这不利于 Using same git repository by multiple users
是使用git config
,然后删除它,当我真正做过的唯一途径?
虽然'--author' *做*工作(它设置提交的*作者*),它不会改变提交的*提交者*。要设置两者,请参阅下面的吸血鬼答案(http://stackoverflow.com/a/42350173/1256452)。请注意,Mercurial没有单独的作者和提交者,只是作者。 – torek