Created
March 22, 2022 15:25
-
-
Save pgrepds/761ebdbeefdbed54683c6220504ed0d1 to your computer and use it in GitHub Desktop.
Change authorship of commits which are already pushed
This file contains 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
Fix the author of commits which are already pushed. | |
To fix the last six commits: | |
* First set the correct author for current Git repo using `git config --local user.name FirstName LastName` | |
and `git config --local user.email [email protected]` | |
* Then apply to the last six commits `git rebase --onto HEAD~6 --exec "git commit --amend --reset-author --no-edit" HEAD~6` | |
* Finally, push using `git push --force-with-lease` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment