0
是否有可能在沒有全局設置的user.email/use.name的情況下執行git merge
?加入--author 'Your Name <email>'
Git合併時沒有全局設置用戶名
git commit -m 'my_funny_commit_comment' --author 'Your Name <email>'
是否有可能在沒有全局設置的user.email/use.name的情況下執行git merge
?加入--author 'Your Name <email>'
Git合併時沒有全局設置用戶名
git commit -m 'my_funny_commit_comment' --author 'Your Name <email>'
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident <email> not allowed
在git commit
情況下,可以簡單地執行一個承諾,而全球的用戶名/電子郵件:
我得到以下致命錯誤,導致合併如果您不想全局設置電子郵件地址,您只能設置電子郵件和密碼 -
git config user.name "Your Name"
git config user.email "[email protected]"
雖然上面推薦的方法,您可以用git commit
太
git -c "user.name=Your Name" -c "[email protected]" commit
傳遞的參數,我不喜歡的用戶名進行任何存儲在當前存儲庫。我希望它獲得每個提交/合併的用戶名。如果我可以以某種方式將它設置爲僅用於當前會話(控制檯),那就沒有問題。 – r2d2oid
嘗試在控制檯中設置「GIT_AUTHOR_NAME」和「GIT_AUTHOR_EMAIL」環境變量,並查看系統中是否爲每會話。 –
設置'GIT_AUTHOR_NAME'和'GIT_AUTHOR_EMAIL'沒有幫助。 – r2d2oid