Live data from Hacker News

Beej's Guide to Git

beej.us

41–50 of 318 posts

Re: Beej's Guide to Git

#41
post #30

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

Just a quick shout-out; I was one of the many many students you taught at Lambda School, and just wanted to say your instruction was one of the highlights of my time there. Thanks for doing what you do!

Re: Beej's Guide to Git

#42

I'm really interested and really hoping this is something I can sink my teeth into. I've always had frustrating experiences with trying to wrap my head around git and have to regularly use it at my job. Branching, making commits, and creating pull requests come easy, but beyond that, I know utterly nothing about it.

If you do check it out and there are parts that are confusing, I'd love to hear about it.

Re: Beej's Guide to Git

#43

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.

My sense, bluntly, is that if people spent half the effort learning git that they do whining about it, no one would bother making a 30+ part guide just explaining stuff you could find in a man page.

Commits are snapshots of a tree. They have a list of ancestors (usually, but not always, just one). Tags are named pointers to a commit that don't change. Branches are named pointers to a commit that do change. The index is a tiny proto-commit still in progress that you "add" to before committing.

There. That's git. Want to know more? Don't read the guide, just google "how to I switch to a specific git commit without affecting my tree?", or "how do I commit only some of my changed files?", or "how to I copy this commit from another place into my current tree?".

The base abstractions are minimalist and easy. The things you want to do with them are elaborate and complicated. Learn the former, google the latter. Don't read guides.

Re: Beej's Guide to Git

#44
post #10

Earlier quoted context omitted.

Definitely more efficient in terms of power consumed, not so in terms of human effort to build such guides across nearly every topic one could think of. But you're right, we shouldn't ignore the power consumption. I have found that asking AI "You are an expert teacher in X. I'd like to learn about X, where should I start?" is actually wildly effective.

> not so in terms of human effort to build such guides across nearly every topic How will LLMs be trained if no humans are making learning materials?

Whoever, or whatever, is creating the thing that needs reference materials would have to seed the initial set (just as they/it seeded the thing itself) and then go from there.

If you didn't, then you won't be included the training set (obviously) and the AI would not easily know about you. Sort of how if you start a really cool company but don't make a website Google doesn't know about you and can't return you in their search results. It's valuable for Google (AI) to know about you, so it's valuable to build the sites (docs) to get indexed (trained on).

Re: Beej's Guide to Git

#45

Earlier quoted context omitted.

No. Git is a complex program but version control is an inherently complex problem that requires powerful tools. There's certain set of problems where, as a programmer, you're going to have to sit down and actually read the book. The universe doesn't owe you an easy 10 minute video solution to everything, it's an annoying educational expectation that people seem to have developed. Some things are just that difficult a…

No. Source control is not that complicated. Git is just bad. As an existence proof: Mercurial is much better and simpler. I can teach someone who has never even heard of source control how to use Perforce in about 10 minutes. They will never shoot themselves in the foot and they will never lose work. There are certainly more advanced techniques that require additional training. But the basics are very easy. Git makes…

Out of curiosity, what are the most common foot guns, in your opinion?

Re: Beej's Guide to Git

#46
post #43

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.

My sense, bluntly, is that if people spent half the effort learning git that they do whining about it, no one would bother making a 30+ part guide just explaining stuff you could find in a man page. Commits are snapshots of a tree. They have a list of ancestors (usually, but not always, just one). Tags are named pointers to a commit that don't change. Branches are named pointers to a commit that do change. The index…

Or do read books and guides. But in an exploratory manner. So when you do have a need for a specific operation (which happens rarely) you have a mental map that can give you directions.

Re: Beej's Guide to Git

#48
post #43

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.

My sense, bluntly, is that if people spent half the effort learning git that they do whining about it, no one would bother making a 30+ part guide just explaining stuff you could find in a man page. Commits are snapshots of a tree. They have a list of ancestors (usually, but not always, just one). Tags are named pointers to a commit that don't change. Branches are named pointers to a commit that do change. The index…

The deal killer for me, the inescapable aspect of my users, is that they insist upon checking passwords into revision control.

Because the C and PL/SQL people are on CVS, I can fix this with vi on the ,v archive.

First on TFS repositories, and now with git grep I can easily find exposed passwords for many things. But it's just SQL Server!

We will never be able to use git responsibly, so I will peruse this guide with academic interest.

Don't even get me started on secrecy management.

I am looking forward to retirement!

Re: Beej's Guide to Git

#49
Haven’t checked out the article, I’m sure its great. But another reco is boot.dev’s git course taught by Primeagen. It’s interactive and He goes real deep down to manipulating files in the .git directory. Came out of that course with a whole new mental model of how git works.

Re: Beej's Guide to Git

#50

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.

Eh, yes and no. Git porcelain stuff's plenty good for probably 95% of users. `rebase -i` comes with a guide on which commands do what, and you could write a couple of paragraphs about how to format `git log`'s output with your own preferences and tradeoffs -- and porcelain usually includes stuff as eclectic as `git gc`, `git fsck`, and `git rev-parse` by most accounts. Git plumbing's definitely a bit more obscure, an…

not my experience - almost always some edge case leads me to a git rabbit hole

tldr: even if you never plan to use anything advanced, you’ll end up in some weird situation where you need to do something even if you’re in the “95% of the users”

no shade, yes ofc you “could this, could that” to make things work and we have been stuck with this for so long that an alternative doesn’t even seem plausible

Post reply on HN