2017-06-12 36 views
0

當我在本地運行git log命令時,我可以看到git(Bitbucket)的密碼。在作者字段中顯示密碼的Git日誌

commit af45fb439beb489f473b6e935dfc..... 
Author: username <Password> 
Date: Sat Jun 10 15:32:30 2017 +0530 
.... 

我如何從下一次檢查中刪除作者字段的密碼以及歷史檢查?

回答

1

您必須重寫設置正確作者的分支歷史記錄。 https://help.github.com/articles/changing-author-info/

+0

謝謝!但是你知道爲什麼我的密碼顯示在日誌中,因此下一次提交不會有它 –

+2

我猜想在某些時候,你錯誤地請求輸入用戶名和密碼的請求,所以你輸入了兩個。 –

+0

謝謝@ LasseV.Karlsen我用git config --list來查看所有的配置..並且由於我把密碼放在電子郵件字段 –

0

要在提交重置您的用戶名:

git rebase -i <commit-id of the previous commit> 

一旦編輯器中打開,在提交給編輯以edit前改變pick。保存並退出。然後,

git commit --amend --author="Author name <email>" 

git rebase --continue