Created
August 29, 2024 22:38
-
-
Save peternewman/5c3948699ed01340eb342295aa660b71 to your computer and use it in GitHub Desktop.
git squash keeping history
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
| # 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment