Forked from despairblue/squash-before-public-release.sh
Last active
March 6, 2022 09:57
-
-
Save Twintails/18b75ad97c721f94ac43d94f801127e3 to your computer and use it in GitHub Desktop.
squash entire git 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
# use at your own risk, might eat hamster and nose dragons | |
git branch -m master master-bak | |
git checkout --orphan master | |
git reset --hard | |
git commit --allow-empty -m 'init' | |
git merge --ff --squash --allow-unrelated-histories master-bak | |
git commit --amend | |
git push --set-upstream --force origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment