Answer the question
In order to leave comments, you need to log in
How to clean up .git folder (from local and remote repository)?
They are growing. And I don't need rollbacks, because these are just github pages.
Answer the question
In order to leave comments, you need to log in
If you just need to delete the old history, then this can be done quickly and safely with just a couple of commands.
The first command will collapse the entire history of the branch into a single commit:
git reset $(git commit-tree HEAD^{tree} -m 'Новое начало истории')
git gc --prune=now --aggressive
git push --force
Nothing from remote. You can merge the branch into the master with squash, but when the purge happens, it depends on the service. The local one can be cut out by creating a new one, and the history can be rewritten with garbage cleaning. And then pour on a new remote
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question