Live data from Hacker News

Beej's Guide to Git

beej.us

311–318 of 318 posts

Re: Beej's Guide to Git

#311
post #30

Hey all--if you find things wrong, post 'em. I'll clean 'em up. :) Love, Beej

There's an issue for the IPC guide on GitHub that's almost a year old with zero reaction.

That's my lowest traction guide, I think, not counting Beej's Guide to Killing Dragons. :)

I've fixed it, and wrote a quick script to list all issues and PRs on all my books so they don't fall through the cracks.

Re: Beej's Guide to Git

#312
post #309
post #30

Hey all--if you find things wrong, post 'em. I'll clean 'em up. :) Love, Beej

Ok, so unless I'm missing something, this is a big error. In 9.4 there's no way reallinux/master points to same commit as master after the merge. It will still be where it was, one commit behind.

Yeah... so re-reading that, I don't know what I was thinking. Uploading a rewrite of that bad crap now.

Re: Beej's Guide to Git

#313

Earlier quoted context omitted.

>It did take maybe a year or so we have normalized this for git - a tool to store versions of text. That’s the problem

Maybe you’re young, but git is better than all of the other shit before it. Try to come up with something simpler than git, and you’ll end up with something like SVN or CVS that struggled with more than a couple of people working on the same files. Try to make something that is more content aware, and you’ll find out how git got its name in the first place.

[dead]

Re: Beej's Guide to Git

#314
Thank you for your diligence in explaining complicated topics in a way that makes them accessible to people trying to learn what people before them figured out. You are a true educator that seems have found a place to support you to continue doing that.

Are you concerned that your git exposition is much longer than the other guides you have produced?

Re: Beej's Guide to Git

#315
post #277

Earlier quoted context omitted.

Why are programmers so vehemently angry over the fact that a complex tool which does complex things to a complex data structure might have some complexity to it?

"I don't understand this complexity so this means it shouldn't exist"

Linus wrote it, so there's got to be a pony in there somewhere. He's the first person in the world to figure out version control software. /s

Re: Beej's Guide to Git

#316
post #64

I can't help but feel that Git has completely missed the forest through the trees that you can make a 30+ part guide explaining how to use it.

Honestly, 99% of the pain of git is simply because people use it through the CLI. If you use tortoisegit or a visual tool, you don't need to worry about any of this because its self explanatory, and it becomes trivial to use Learning git like this is honestly just hampering yourself

Git GUIs like Turtois, Cracken, Lens, VSCode's Source Control are opinionated and for some reason all do weird stuff under the hood. If you look at the commands being run, a simple action or click in the menu results in a combination of 2, 3, 4 git commands that often resemble nothing like how I (and I imagine most people) would do it in CLI.

This is just asking for trouble.

Re: Beej's Guide to Git

#317
post #148
post #30

Hey all--if you find things wrong, post 'em. I'll clean 'em up. :) Love, Beej

Not wrong, but since you’re mentioning vim in the context of git, might be worth adding :cq as a way to exit with a non-zero status to prevent git from finishing the commit / operation.

:cq is useful in a shell loop that compares two directory trees that invokes vim to let you see what's changed in every file that's different. I use it often:

    ((cd /tmp/t; find . -type f -print) | sort | while read f; do cmp -s {/tmp/t,/tmp/t1}/$f || vim -f -d {/tmp/t,/tmp/x1}/$f 0
Typing ^C to vim doesn't get you very far, so if you make a mistake causing the loop to return 1000's of files you are in for a bit of pain without :cq. The :cq triggers the break, exiting the loop.

Re: Beej's Guide to Git

#318
post #311

Earlier quoted context omitted.

There's an issue for the IPC guide on GitHub that's almost a year old with zero reaction.

That's my lowest traction guide, I think, not counting Beej's Guide to Killing Dragons. :) I've fixed it, and wrote a quick script to list all issues and PRs on all my books so they don't fall through the cracks.

Thanks!
Post reply on HN