Git log showing password in author field

时间:2017-06-12 16:43:06

标签: git bitbucket

I can see the password of the git(Bitbucket) when I run git log command locally.

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

How I can remove password from author field from next check in as well as historical check ins ?

4 个答案:

答案 0 :(得分:2)

You'll have to rewrite the history of the branch setting up the right author. https://help.github.com/articles/changing-author-info/

答案 1 :(得分:0)

要在提交中重置用户名:

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

编辑器打开后,将要编辑的提交前面的pick更改为edit。保存并退出。然后,

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

git rebase --continue

答案 2 :(得分:0)

兄弟。

此问题与您的git配置有关。

您可以尝试查看git config:

git config --list

因此,您可以修改gitconfig文件来解决此问题。

vim ~/.gitconfig

答案 3 :(得分:0)

遇到同样的问题。该链接非常有用:change author name

如果您只想为最后一次提交更改作者姓名,请执行git commit --amend --author="name <email>",您应该会很好

使用git rebase可以更改多个较早提交的作者信息。请参阅上面的链接以获取确切步骤。

此外,在git config中编辑作者名称,以便将来的提交将具有正确的信息。 vi〜/ .gitconfig并编辑用户名字段。

相关问题