Live data from Hacker News

Oh Shit, Git?

ohshitgit.com

271–275 of 275 posts

Re: Oh Shit, Git?

#271
post #21
post #14

Earlier quoted context omitted.

> even though it is, of course, entirely possible I take the more realistic perspective: until git makes it impossible to commit something that shouldn't have been, like a secret, then deleting a file from history is a fundamental requirement of git.

The designers of git clearly disagreed, as you can guess from its design, so it's not surprising it might feel like a bit of an uphill struggle (and will probably remain so). There are other tools available.

> The designers of git clearly disagreed

filter-branch has been around since, at least, 1.8. It exists to rewrite history, this specific use case (as the official documentation details) included. An open source project admitting that a solution is better than their own does not mean the developers "disagree" with it, especially when the functionality has already been part of the developers tool for over a decade.

Re: Oh Shit, Git?

#272
post #271
post #21

Earlier quoted context omitted.

The designers of git clearly disagreed, as you can guess from its design, so it's not surprising it might feel like a bit of an uphill struggle (and will probably remain so). There are other tools available.

> The designers of git clearly disagreed filter-branch has been around since, at least, 1.8. It exists to rewrite history, this specific use case (as the official documentation details) included. An open source project admitting that a solution is better than their own does not mean the developers "disagree" with it, especially when the functionality has already been part of the developers tool for over a decade .

But if they didn't disagree, they'd have designed a system that made removing things from remote history easy, rather than a complete pain in the ass that's basically impossible to make work usefully anyway. The whole thing runs largely based on commit hashes, and when you change history, all the commit hashes change, and... good luck. This behaviour has some useful properties but it's quite often not what you want. And that isn't how this sort of system inevitably has to work! - but git does anyway, and always has done.

(By comparison, if you want to delete something from the Perforce history, there is a command for that. You can remove individual revisions, leaving gaps in the history, or the whole thing.)

Re: Oh Shit, Git?

#273
post #144

I’m pumped a search for hg+mercurial had hits in this thread. I am and will continue to be completely blown that hg lost the dvcs wars. It’s a better tool.

Modern scum (members of depraved modern culture) always prefer what is worse over what is better, so of course they prefer Git over Mercurial. Anyone who wants Mercurial hosting can use my hosting: https://hg.reactionary.software/

Re: Oh Shit, Git?

#274
post #272
post #271

Earlier quoted context omitted.

> The designers of git clearly disagreed filter-branch has been around since, at least, 1.8. It exists to rewrite history, this specific use case (as the official documentation details) included. An open source project admitting that a solution is better than their own does not mean the developers "disagree" with it, especially when the functionality has already been part of the developers tool for over a decade .

But if they didn't disagree, they'd have designed a system that made removing things from remote history easy, rather than a complete pain in the ass that's basically impossible to make work usefully anyway. The whole thing runs largely based on commit hashes, and when you change history, all the commit hashes change, and... good luck. This behaviour has some useful properties but it's quite often not what you want.…

> But if they didn't disagree, they'd have designed a system that made removing things from remote history easy

That's not how real world software development works, especially open source (built on volunteer time, usually for personal use, then shared). See X window system, javascript, etc. Git's foundation was built in 5 days as a side project [1][2]. There wasn't some committee, design reviews, etc with perfect foresight. A foundation was built, and built upon, that worked great for 97% of the use case, with the remaining 3%, including those pesky "real world use" quirks, not fitting so great. This is common in software development [3]. I don't think you can reasonably extract an "agree" or "disagree" developer opinion from the implementation of the feature, but since the filter-branch feature was added 18 years ago [4], two years from gits birth, time for those pesky "real world" scenarios to be revealed, I think "agree" is probably the more likely. "Probably should have made that a first class feature" isn't some impossible phrase...I know I've said it many times.

I would be interested in the history of it though. I think a git documentary would be friggin amazing.

[1] Linus mail: https://marc.info/?l=git&m=117254154130732#:~:text=So%20git%...

[2] Interview with Linus: https://www.linuxfoundation.org/blog/blog/10-years-of-git-an...

[3] https://en.wikipedia.org/wiki/Leaky_abstraction

[4] filter-branch patch: https://lore.kernel.org/git/Pine.LNX.4.64.0706030129110.4046...

Re: Oh Shit, Git?

#275
post #54

Earlier quoted context omitted.

I have had git corruption problems on a raspberry pi sd card, usually I just had to reclone/abandon that folder

It honestly sounds like git is the least of your problems here...

yeah I can delete the .git folder and repull/add the remote origin, I had to do that again the other day. I'm not sure what it is, my SD card is a gold sandisk too not a cheapo.
Post reply on HN