Live data from Hacker News

Beej's Guide to Git

beej.us

281–290 of 318 posts

Re: Beej's Guide to Git

#281
It's great to see more git documentation, and I have a lot of respect for Beej's Guide to Network Programming. However he really needs to work on his commit hygiene. I get that this is a one-man project, but still it's pretty atrocious: https://github.com/beejjorgensen/bggit/commits/main/. This does not set a good example.

I usually refer people to https://cbea.ms/git-commit/.

Re: Beej's Guide to Git

#282
post #30

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

In section 5.7:

> But in this section we’re going to be talking about a specific kind of merge: the fast-forward. This occurs when the branch you’re merging from is a direct ancestor of the branch you’re merging into.

Looks like "from" and "into" are swapped: "main" is "into" there, "newbranch" is "from", and "main" is a direct ancestor of "newbranch".

Re: Beej's Guide to Git

#283

Earlier quoted context omitted.

> I don't know why Git won the VCS contest Because GitHub offered free git hosting, and heroku came along and offered free hosting that was pretty much point and go. Combined, you all of a sudden went from needing a sysadmin and two servers (this was pre containers), and the sysadmjn skills to operate SVN and your web app, to “it’s now free and it auto deploys when I commit”.

Bitbucket offered free Mercurial hosting before GitHub even existed, if memory serves. And it's all but dead. And, I don't know if GitHub succeeded because of Git or the other way around.

Bitbucket and GitHub started around the same time. GitHub executed better. And the Ruby community adopted GitHub early. Comparisons around 2010 said GitHub's UX and network effects were top reasons to choose Git. Mercurial's UX and much better Windows support were top reasons to choose Mercurial.

Re: Beej's Guide to Git

#284
post #175
post #148

Earlier quoted context omitted.

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.

This is a fantastic mention! I've been commenting out my commit message lines and then saving as a way to trigger this. Feeling like a caveman...

Guilty as changed your honour

Re: Beej's Guide to Git

#285
post #261
post #237

Earlier quoted context omitted.

TIL! The funny thing about Vim is that you can have used vi/Vim for 30+ years and still learn new things. I'll add this to the Vim appendix. Cheers!

It is the same with Git

If you have been using git for 30+ years, you need to take me to your time machine. It turns 20 this year.

Re: Beej's Guide to Git

#286
post #277

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.

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"

Re: Beej's Guide to Git

#287
post #64

Earlier quoted context omitted.

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

Learning it like this makes one learn the concepts though and build something closer to an actual understanding. I have seen people struggle with understanding what git does or with making fine grained commits or mostly atomic commits a lot, especially GUI users, because many of them do not have the underlying concepts understood well enough.

Knowing how to do it through the CLI adds nothing to your understanding of the concepts though. Its just whether or not you have to remember an opaque CLI command, or you get a UI to click

Re: Beej's Guide to Git

#288
post #30

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

Unrelated; I just wanted to say that I learned programming from your socket tutorials when I was a kid. Everything was so well written that I used it from highschool, to varsity to my day2day job.

Without your tutorials I’m not even sure if I would have chosen the carreer I did- thank you for all the love and effort you put into your posts; Im sure that there are many other people who you’ve touched in a similar way

Re: Beej's Guide to Git

#289
post #277

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.

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?

It's the de facto tool for our industry. For the vast majority of cases, users bear the burden of that complexity without gaining much benefit. And (at least for me) it doesn't guarantee the one thing I need it to do - make sure I can never lose progress.

Re: Beej's Guide to Git

#290
post #287

Earlier quoted context omitted.

Learning it like this makes one learn the concepts though and build something closer to an actual understanding. I have seen people struggle with understanding what git does or with making fine grained commits or mostly atomic commits a lot, especially GUI users, because many of them do not have the underlying concepts understood well enough.

Knowing how to do it through the CLI adds nothing to your understanding of the concepts though. Its just whether or not you have to remember an opaque CLI command, or you get a UI to click

I think it depends. If the GUI tooling is exposing you less to the actual concepts and builds new concepts on top, that simplify things, then that will hamper a new user's understanding of the underlying concepts. Of course, it is not the CLI usage itself, that is the key here, but the usage of a tool, which exposes you to the actual concepts of git, and the most common tool like that is, of course, the default git command line interface.
Post reply on HN