Last active
April 30, 2022 21:47
-
-
Save yuriburger/345c24154d50a37604b6d2a44d12eef7 to your computer and use it in GitHub Desktop.
[git clear commit history] Git clear commit history #git
This file contains 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 FixHistory | |
git add -A # Add all files and commit them | |
git commit -m "Fix history" | |
git branch -D develop # Deletes the master branch | |
git branch -m develop # Rename the current branch to master | |
git push -f origin develop # Force push master branch to github | |
git gc --aggressive --prune=all # remove the old files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment