Created
April 5, 2021 13:30
-
-
Save reitowo/1b26def7e28929a7a7dac694910478df to your computer and use it in GitHub Desktop.
Clear 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
git checkout --orphan latest_branch | |
git add -A | |
git commit -am "Clear Git History" | |
git branch -D master | |
git branch -D main | |
git branch -M main | |
git push -f origin main | |
git branch --set-upstream-to origin/main main | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment