1

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.

Physician
  • 483
  • 2
  • 7
  • 1
    Does 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 Answers1

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