Live data from Hacker News

Mea Culpa: GitHub works well, my mistake made them look bad

andrewljohnson.com

11–20 of 48 posts

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#11
post #9

Wouldn't it be great if your scm actually kept all your changes no matter what?

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,

  git reflog show origin/master
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.

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#12
post #9

Wouldn't it be great if your scm actually kept all your changes no matter what?

I mean, "-f" is for forcing overwriting of changes.

The other developer had several recourses.

The awesome ProGIT book: http://progit.org/

The hotness of the GitReady: http://gitready.com/

The great MAN pages of course: http://www.kernel.org/pub/software/scm/git/docs/

GitCasting like a boss: http://gitcasts.com/

GIT users on IRC: irc://freenode.net/git

And of course, Github itself. They're awesome in a box: http://help.github.com/

Regardless, it's nice to see a developer publicly admit the error of his ways, and even nicer to see other developers brush it off and keep going as they give support.

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#13
Instant overreaction and posting to HN has come up a lot lately.

The Skype story yesterday was another mistake where a technical support person wrote that a bug was "by design" when they meant to type "bug," so of course it gets raced into HN as 'news' rather than trying to get clarification.

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#14
post #11
post #9

Wouldn't it be great if your scm actually kept all your changes no matter what?

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, git reflog show origin/master 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.

You can lose commits if you use git gc but you're probably aware of what you're doing when you do that.

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#15
post #13

Instant overreaction and posting to HN has come up a lot lately. The Skype story yesterday was another mistake where a technical support person wrote that a bug was "by design" when they meant to type "bug," so of course it gets raced into HN as 'news' rather than trying to get clarification.

To be fair when working as a software tester on more than one occasion did a developer mark an obvious bug as "by design".

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#16
post #8

Very classy apology. While Andrew's quickly jumping to conclusions is certainly not something to emulate (as he obviously implies in his apology), his ability to assume complete responsibility for a mistake that damaged a reputation is something all members of Internet communities should take note of.

Similarly, GitHub acted in a classy way too. Tom helped Andrew throughout the thread without any snark or dismissals that are, sadly, quite easy to dish out. It certainly contrasts with the recent "go away" Tumblr story.

I just looked up the post you were referencing. That was pretty shocking. As I mentioned earlier, this post deserves some recognition.

I screw up plenty, so I'm no stranger to apologizing to my partner. However, I could certainly take a page from the original poster. My apologies lack a certain degree of class!

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#17
post #9

Wouldn't it be great if your scm actually kept all your changes no matter what?

That's like saying: wouldn't it be great if your filesystem kept all your files no matter what. Well, no, there are instances where you want to actually throw things out. The push man page specifically says:

  -f, --force
    Usually, the command refuses to update a remote ref that is not an
    ancestor of the local ref used to overwrite it. This flag disables
    the check. This can cause the remote repository to lose commits;
    use it with care.
And even with that, the commit wasn't lost yet. It likely in the reflog of the remote repo, and in the history of whichever repo the change was originally pushed from.

That said, there are ways to lose work with git that aren't recoverable ("reset --hard" silently overwrites uncommitted work), but this isn't one of them.

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#18
post #11
post #9

Wouldn't it be great if your scm actually kept all your changes no matter what?

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, git reflog show origin/master 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.

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

#19
post #11

Earlier quoted context omitted.

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, git reflog show origin/master 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.

You can lose commits if you use git gc but you're probably aware of what you're doing when you do that.

Even with git gc you have to try pretty hard to lose updates -- I believe by default it will leave stuff only reachable from the reflog around for 90 days.

(I <3 git.)

Re: Mea Culpa: GitHub works well, my mistake made them look bad

#20
post #8

Very classy apology. While Andrew's quickly jumping to conclusions is certainly not something to emulate (as he obviously implies in his apology), his ability to assume complete responsibility for a mistake that damaged a reputation is something all members of Internet communities should take note of.

And submitting this story as NoKarmaForMe for that little extra real-world Karma.
Post reply on HN