Created
May 30, 2020 08:59
-
-
Save vishalbhimani/42187a3baeeefc1129595bf1677ceb78 to your computer and use it in GitHub Desktop.
Delete all commit history in github repository
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
#Checkout | |
git checkout --orphan <LATEST BRANCH> | |
#Add all the files | |
git add -A | |
#Commit the changes | |
git commit -am <COMMIT MESSAGE> | |
#Delete the branch | |
git branch -D master | |
#Rename the current branch to master | |
git branch -m master | |
#Force update your repository | |
git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment