Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by stinkbeetle

22 days ago

`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.

3 comments

stinkbeetle

Reply

eru  22 days ago

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

_flux  22 days ago

But it does remove current uncommitted changes.

  • olvy0  20 days ago

    Except for new files, you'd have to also run git clean -f

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities