Git modify the user name information has been submitted

Because of work or other reasons, sometimes we will modify the git user name and email account, do not change overnight submitted, it will lead to inconsistent person submitting information problems.
Now back to the record correction method

 

# The first step, (n) represents the number of commits
git rebase -i HEAD~n
Step #
Then press `i` edit the` pick` into `edit`, press 'Esc' to quit editing, press`: Quit wq` save
# third step
git commit --amend --author = "author <mailbox @ xxxx.com>" --no-edit
# the fourth step
git rebase --continue
# the fifth step
git push --force

  

Guess you like

Origin www.cnblogs.com/tl542475736/p/11943718.html