Last active
October 1, 2023 22:25
-
-
Save sandipchitale/b423099eccfdaba5037cefcb4de5d57f to your computer and use it in GitHub Desktop.
Collapse all history of git repo. #git
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 onetime | |
git add -A | |
git commit -m "Initial commit" | |
git branch -D main | |
git branch -m main | |
git gc --aggressive --prune=all | |
git push -f origin main |
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 onetime | |
git add -A | |
git commit -m "Initial commit" | |
git branch -D master | |
git branch -m master | |
git gc --aggressive --prune=all | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment