Skip to content

Instantly share code, notes, and snippets.

@skounis
Created November 9, 2021 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skounis/19c963ceb52abb76b051997284b07a9b to your computer and use it in GitHub Desktop.
Save skounis/19c963ceb52abb76b051997284b07a9b to your computer and use it in GitHub Desktop.
Retroactively Sign Git Commits
# First read
# https://webdevstudios.com/2020/05/26/retroactively-sign-git-commits/
#
# 1. Change into the working branch the commits were made
# 2. Rebase and go back `~xx` commits. For example last two
git rebase -i HEAD~2
# 3. Replace "pick" with "rework" in the next prompt and save.
# 4. Push
git push --force-with-lease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment