Skip to content

Instantly share code, notes, and snippets.

View peternewman's full-sized avatar

Peter Newman peternewman

View GitHub Profile
@peternewman
peternewman / gist:5c3948699ed01340eb342295aa660b71
Created August 29, 2024 22:38
git squash keeping history
# Make a backup copy of the branch
git clone
git rebase -i --root --committer-date-is-author-date --keep-empty
# Push to upstream branch
git push upstream HEAD:main --force-with-lease