Live data from Hacker News

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

andrewljohnson.com

41–48 of 48 posts

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

#41
post #36

I wish github (and git in general) had a better way to view the history of your history, as it were. It's great that get let's you change histoy, but it can be quite problematic if someone messes up that history, especially if it's not caught right away. Yes, it's in the reflog, but so is _everything_, so finding the right thing can be quite daunting.

Have you tried gitk, or https://github.com/shoes/shoes/network , for example? What would you like to see?

I don't work for GitHub, I've just never really had this problem, so I'm curious.

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

#43
This is something that always bothered me about git. Anyone with access to the repository can delete or overwrite a branch. Would be nice, if github had a way restrict deletes of a branch, or a prevent a force push. Not sure if git architecture actually makes this possible.

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

#44
It is great to admit but this is also good lesson for developers... you should always blame yourselves first; I have heard lots of funny stories over the years.

1.) I think there is an issue with the compiler :) 2.) The Java Classloader is broken :) 3.) Git is broken :)

My response -> "I will think of a million things it could possibly be on my way to your desk of those; the compiler, the classloader and git won't even be in the list"

3.) It doesn't work in IE 6...

Well ok, I guess the browser is the one area where blaming something else might be appropriate.

If after looking through all the possibilities that could be a reason for it not being your fault, stand up get a coffee and look at it again.

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

#45
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://he…

Bald-faced pimping of a resource the company I work for, EdgeCase, put together as well: http://gitimmersion.com/

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

#46
Wasn't there fiasco involving one prominent magazine for PC machines, where the author claimed that Vista was using all of the memory, while that memory in fact was cached.

But when in doubt, what happens with your cache on XP, Vista or Windows7 just use Mark Russinovich's RamMap. For example it helped me realize that NTFS compressed files, although compressed on disk would end up using the same amount of cache (memory). For that reason, it's probably better to store files compressed, rather than relying on NTFS.

http://www.google.com/search?q=rammap

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

#47
post #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; u…

The difference being that an SCM records the history of your project. It would certainly be possible to record this simply as a "forced overwrite" in the history.

Which git sort-of does (reflog). And then, after it prevented you from shooting yourself into the foot, it gives you a loaded Howitzer pointed at your face. (git reflog expire/git prune/git gc)

I love git dearly, but that's still a large flaw in its design. There is no reason to ever lose history.

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

#48

Earlier quoted context omitted.

So it appears that every response to my message said that it wasn't lost but would be in 90 days if no one noticed. That is not the definition of 'never loses changes'. The fact of the matter is that someone that doesn't understand the way git works can cause irreversible damage without recourse if not discovered. In many source control systems this is not the case. I still use git on github even with this flaw.

The underlying problem is that GIT was never meant as a centralized scm. A centralized source control system will never lose changes, even if one of the users messes up. This means that it distinguishes between normal committers and 'admins'. Only admins can do irreversible actions. Git uses local, cloned repositories and users can do everything they like with them. Changes can be pushed and pulled to other repositor…

You don't need to allow others write access to your repositories on github. Simply have them fork your public repository but don't add them as a collaborator. They can commit all they want and send you or any one of your 'admin' collaborators a pull request. This idea that git/github is losing changes is not true. You have at least until the next time the gc is run (90 days at github?), which is well beyond the time required to resolve the issue in any active project.
Post reply on HN