Last active
February 29, 2024 04:18
-
-
Save rudolfolah/4c9e4f61443ac71c5700e4987372ebe8 to your computer and use it in GitHub Desktop.
update github author for commits, useful for older repos with inactive/non-github associated emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preserves the date when updating all commits | |
git -c rebase.instructionFormat='%s%nexec GIT_COMMITTER_DATE="%cD" git commit --amend --no-edit --author "Your Name Goes Here <[email protected]>"' rebase -r --root | |
# Updates all commits from the current HEAD commit until the given commit hash | |
git rebase -r <commit> --exec 'git commit --amend --no-edit --author "Your Name Goes Here <[email protected]>"' | |
# You can update all commits, use only if all the commits are your own! | |
# git rebase -r --root --exec 'git commit --amend --no-edit --author "Your Name Goes Here <[email protected]>"' | |
# Source: https://stackoverflow.com/a/75841127 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment