The file of my repository is very large. I am sure that I don't want to revert any previous commit, meaning all changes that have been done are wanted to be kept for good in the code. I just want to delete all the previous history while keeping the changes in place.
Asked
Active
Viewed 47 times
1
-
1Does this answer your question? [How to roll back Git repo to first commit and delete all history](https://stackoverflow.com/questions/16499908/how-to-roll-back-git-repo-to-first-commit-and-delete-all-history) – TonyArra Apr 16 '22 at 20:27
1 Answers
1
You can just delete the .git
folder and then reinitialize the repo with git init
.
On Windows, this can be done with rmdir /s .git

TonyArra
- 10,607
- 1
- 30
- 46
-
-
I couldn't find a .git file, there're a bunch of IPCH files, .gitignore, .gitattributes, .editorconfig, and two Windows Batch Files – Physician Apr 16 '22 at 20:57
-
It's a hidden directory. You can do it from the terminal with `rmdir /s .git` – TonyArra Apr 16 '22 at 21:00