←back to thread

1062 points mixto | 1 comments | | HN request time: 0s | source
Show context
boneitis ◴[] No.42942112[source]
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.

replies(2): >>42942475 #>>42942759 #
1. lucasoshiro ◴[] No.42942475[source]
One mistake that I see people making about Git is trying to learn more commands, more flags, more tricks, but not trying to really understand how it works. Perhaps it's your case. You know Git enough to use in your daily basis, so maybe it's time to dive into a lower level and then everything else will be natural.

I strongly suggest reading Pro Git, the official Git book by Scott Chacon and Ben Straub, available for free here: https://git-scm.com/book/en/v2.

I find it very pleasant to read and it really changed my perspective not only about Git but about how to write code in general. You don't need to read it entirely, but suggest at least these sections:

- 1.3 Getting Started - What is Git?: explains a little about snapshots and the three states

- 10.1 ~ 10.3 Plumbing and Porcelain, Git Objects and Git References: this explains Git in its lowest level, which is surprisingly simple but powerful. Those sections were enough for me to write my own "Git" (you can see it here: https://github.com/lucasoshiro/oshit)