logoalt Hacker News

stinkbeetleyesterday at 12:58 AM2 repliesview on HN

`git reset --hard` doesn't remove unreferenced commits or rewrite the reflog so I don't think that would do it. Something like `git reset && git gc` would have to be done.


Replies

eruyesterday at 2:57 AM

And git gc doesn't collect any garbage less than two weeks old by default, either.

_fluxyesterday at 7:20 AM

But it does remove current uncommitted changes.