How to change the author and committer name and e-mail of multiple commits in Git?

后端 未结 30 3060
野性不改
野性不改 2020-11-21 04:50

I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in my pendrive, cloned from my computer at home). After several c

30条回答
  •  天涯浪人
    2020-11-21 05:13

    It happens when you do not have a $HOME/.gitconfig initialized. You may fix this as:

    git config --global user.name "you name"
    git config --global user.email you@domain.com
    git commit --amend --reset-author
    

    tested with git version 1.7.5.4

提交回复
热议问题