Skip to content

Instantly share code, notes, and snippets.

@aabragan
aabragan / squash_and_sign_commits.sh
Last active September 22, 2022 13:15
Squash all commits into one and sign new commit
git checkout myExistingBranch
git reset $(git merge-base main $(git branch --show-current))
git add -A
git commit -S -m "some new commit message"
git push --force