
How to delete all commit history in GitHub?
If you ever pushed your credentials into GitHub and you had many commits after that incident then it would be a big problem removing the credentials f
Draft
1 November, 2021
Contributors
If you ever pushed your credentials into GitHub and you had many commits after that incident then it would be a big problem removing the credentials from the history. So one of the options would be to delete the whole commit history. In this tutorial we are going to see how to do that 😉
Deleting the commit history
Create a new branch
Add all the files
Commit the changes
Delete the branch
Rename the current branch to main
Finally, force update your repository
9
8
8
8
8
7
7
7
7
7