Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I believe git gc after force-push will remedy the situation by deleting all unreachable objects, even circular references.


Locally yes, but not on GitHub.


How would you ever end up with a circular reference?


I'm not sure... What if commits erased through forced pushes retain their ancestry? For example, branchA has commit objects A1->A2 while branchB has the same commit objects A2->A1, and then both branches are force-pushed to erase A1 and A2. Would this suffice?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: