Skip to content

Instantly share code, notes, and snippets.

@reitowo
Created April 5, 2021 13:30
Show Gist options
  • Save reitowo/1b26def7e28929a7a7dac694910478df to your computer and use it in GitHub Desktop.
Save reitowo/1b26def7e28929a7a7dac694910478df to your computer and use it in GitHub Desktop.
Clear Git History
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