jdhao / jdhao.github.io

My personal blog: https://jdhao.github.io/
24 stars 6 forks source link

2022/08/05/update_commit_author_info_git/ #65

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

How to Change Commit Author Info in Git - jdhao's digital space

This post summarizes how to update author info of Git commits.

https://jdhao.github.io/2022/08/05/update_commit_author_info_git/

kang8 commented 2 years ago

--reset-author is very useful, thanks!

jdhao commented 2 years ago

Yeah, it is easier than manually set author in command line. I prefer to use --reset-author.

baggiponte commented 2 years ago

does --reset-author not need to specify the new author + email address?

jdhao commented 2 years ago

@baggiponte You can set the author and email info for your repo via:

git config user.name xxx
git config user.email xx@xxx.xx

Then when you use --reset-author, it will use the new author name and email automatially.