Live data from Hacker News

Oh Shit, Git?

ohshitgit.com

41–50 of 275 posts

Re: Oh Shit, Git?

#41
post #34
post #4

Git is one of those technologies that I never got to wrap my head around of, because in so many ways it doesn't follow intuition and unless you have been using it for a long time, for literally every action you would probably have to Google or use the man page of the command.

As everyone knows, though, Git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space.

That's the Darcs joke and you told it somewhat incorrectly.

Re: Oh Shit, Git?

#44

I'm not a git user, but stuff like this really drives home the idea that "git commit" is meaningless, the only thing that matters is when your commits are pushed or merged. It's like saving a textfile. Do you write a little message every time you save a file? No that's silly. Just move on.

If I'm saving changes that were done because of a arduous debugging journey and other people are likely to have to refer back to it, yes. In fact, forget little; the smaller the change is, the bigger the text. Some of my changes have 2-3 paragraphs for a 2-3 line change because of the impact.

Same here. If it took me a week to figure out why to tweak a couple lines of code, I'm going to be explaining it.

(Although also/mainly in the comments if it's something I worry someone might accidentally change back later.)

Re: Oh Shit, Git?

#45
post #30

Earlier quoted context omitted.

"Bro" is the furthest thing from "gender neutral". Not sure how you could think it's gender neutral. It originated from male behavior and is definitely not gender neutral. You can address women as "bro" and they might even respond to you but they'll think you're absolutely weird.

"bro", "bruh", it's more of an exclamation of surprise than a title conferred to the person being addressed, but even then, I don't know, people call folks "auntie" and "uncle" who aren't actually their auntie and uncle. language is flexible. it may reference the kind of fraternity between brothers but that feeling is not limited to the male sex.

Can confirm. It sounds so weird to me, but I hear my kids and their friends call each other "bro" or "bruh" all the time, regardless of gender.

Re: Oh Shit, Git?

#46
We should start recommending UIs as the default way to learn Git. It would solve a third of these problems and another third wouldn't even come up.

If you later decide that the CLI is faster, go ahead. But first, people need to see visually how they can interact with the tree.

I like fork.dev, but most clients are pretty similar at this point.

Re: Oh Shit, Git?

#47
One of the beauties of Git is that as long as you’ve created an object, it’s impossible to lose that work (short of nuking the .git directory).

Committing often is key. Precommit hooks (that take more than ~100ms) go against that.

Re: Oh Shit, Git?

#49
post #33

Earlier quoted context omitted.

The disconnect between git's beautiful internal model of blobs, a tree of commits, and pointers to commits, and the command line interface is so wild. All of these recipes are unintuitive even if you have a firm grasp of git's model; you also need to know the quirks of the commands! To just look at the first one... wouldn't it be more intuitive for the command line interface to be: # this command exists already; $ gi…

I prefer just using `git switch` because it's easy to remember the flags (and the position of arguments), but you're right, there is a simpler way: git switch -c some-new-branch-name git branch -f master HEAD~

You should also be able to do

  git branch -f master origin/master

Re: Oh Shit, Git?

#50
post #48

This is why I run Git inside Git, as the latter allows me to undo anything I do within the former.

As a Gitginner I'm wondering if this a good joke that went "wooooosh", or if this has something to do with submodules, or…?
Post reply on HN