Created
March 4, 2026 19:11
-
-
Save SanteriHetekivi/340b22b411de6bde14486e007e059056 to your computer and use it in GitHub Desktop.
Reset git main branch to contain only one 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 temp_branch && | |
| git add -A && | |
| git commit -m "TODO" && | |
| git branch -D main && | |
| git branch -m main && | |
| git push origin main --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment