Live data from Hacker News

Understanding Git for real by exploring the .git directory

medium.com

1–10 of 92 posts

Re: Understanding Git for real by exploring the .git directory

#2
The most enlightening introduction to git internal model (graph of commits) and how the main commands alter it I have read so far: https://jwiegley.github.io/git-from-the-bottom-up/

I think it is slightly more relevant to understand the model than the .git/ structure since the .git/ folder is just an implementation detail.

Re: Understanding Git for real by exploring the .git directory

#5
post #3

I saw this posted a couple years ago, but it was a great guide to starting out with git: http://pcottle.github.io/learnGitBranching/

I just have to say, I've gone through that guide and it was great. It really helped me understand the refs (branching) model.

It was a couple of years ago, so it may be even better now.

Thanks for posting it. I always had a really hard time trying to track down the link.

Re: Understanding Git for real by exploring the .git directory

#6
Obligatory link to Charles Duan's most excellent git tutorial:

> you can only really use Git if you understand how Git works. Merely memorizing which commands you should run at what times will work in the short run, but it’s only a matter of time before you get stuck or, worse, break something.

http://www.sbf5.com/~cduan/technical/git/

Somehow I do not see this mentioned often despite it is, in my opinion, hands down the best tutorial for git. Not too short, not too long, not too simplifying, not too complicated. Just right.

Re: Understanding Git for real by exploring the .git directory

#10
I worked with someone whose approach was very interesting: he committed the .git directory of a newly initialized repo to a separate, newly initialized repo. And then watched what changed when he added a file, changed things, branched, etc, in the committed .git directory.

It's always seemed worthwhile to me to dig into git's model more, but if you're already comfortable and productive with stuff like detached head/rebasing/basic workflows, it's hard to justify when you're already trying to find time to learn new languages, frameworks and devops tools ...

Post reply on HN