Last active
November 23, 2022 11:02
-
-
Save MickTK/b09650b456b1a77fba982ad2c8bf0b69 to your computer and use it in GitHub Desktop.
Delete the repository commits history preserving all the content.
This file contains 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
# Execute in the repository folder | |
git checkout --orphan latest_branch | |
git add -A | |
git commit -am "-" | |
git branch -D main | |
git branch -m main | |
git push -f origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment