我的git log
命令不顯示我的用戶名。當我這樣做時,git log
我得到:
commit c364356360035c33e5f7b596e0bfcbcaf9284252
Author: = <[email protected]>
Date: Wed May 6 10:18:51 2015 +0200
- 當我這樣做時,
git config user.name
我得到了=
。 - 當我這樣做時,
git config --global user.name
我會得到我的用戶名。
當我這樣做時git config user.name = Me
,git config user.name
我仍然得到=
。
我該如何解決這個問題?
答案1
看起來在您的本機 .git/config 中您有一個空的使用者名稱。嘗試編輯該文件並驗證是否是這種情況。
如果您在本機儲存庫中沒有看到您的姓名/電子郵件,請嘗試在設定使用者名稱/電子郵件時將 --local 新增到您的設定中