Re:Mea Culpa: GitHub works well, my mistake made them look bad
by pwim on Tuesday February 01, 2011 @12:19AM
(#2164545)
As far as I understand, git actually always keeps your changes. It is just the pointers that can be overridden if you force an update. For instance,
shows even remote forced-updates. So although it looked like the commit was lost, it was still there, just not immediately visible, and was fully recoverable.
[ Parent
| on HN ]
Re:Mea Culpa: GitHub works well, my mistake made them look bad
by rtomayko on Tuesday February 01, 2011 @01:05AM
(#2164646)
Yeah, exactly. We (GitHub) use reflogs on the server, so everything that was pushed was in the repository and can't be gc'd out for at least 90 days. The master branch ref was just pointing at the wrong commit due to the forced pushes.
Re:Mea Culpa: GitHub works well, my mistake made them look bad
by tomstuart on Tuesday February 01, 2011 @02:44AM
(#2164825)
Reflogs are a lifesaving Git feature, but I imagine a large proportion of "casual" Git users don't know they exist, not least because a lot of people's Git education comes from poking around the GitHub interface.
It'd be amazing if GitHub began exposing reflogs through the web somehow.
Re:Mea Culpa: GitHub works well, my mistake made them look bad
by docgnome on Tuesday February 01, 2011 @12:26AM
(#2164565)
You can lose commits if you use git gc but you're probably aware of what you're doing when you do that.