Change the author of all commits

git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='youremail@example.com'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='youremail@example.com';" HEAD;

Note: if you are using the code above remember to update the placeholders with your own information.

git push --force origin master

Update Global Git Config

Spent about 8 hours between last night and this morning trying to setup my GPG keys for Github to sign my git commits but I ended up just breaking and fixing my global git configurations. It hadn’t at all crossed my mind to try to edit the configuration directly or try to view a list of all current global configurations.

So if you ever find yourself in a similar situation and you want to see all global configurations or edit your global git configs you can use the commands below.

View a list of all global git configurations:git config --global --list
Edit your global configurations: git config --edit --global