Created
January 8, 2022 19:32
-
-
Save xb4dc0d3/286dd7c451f19741ad413b0589b539bd to your computer and use it in GitHub Desktop.
Remove all commit into one (remove history of commit)
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 "<commit message>" | |
git branch -D master | |
git branch -m master | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment