Series: Straight Line or Tree: Is your mental model of Git incomplete?

Straight road ahead

I read an excellent post by Neil Atkinson called Git branches – Is your mental model wrong?. The post is intended for those who have a little better familiarity with git than most of us have, even after using git for a long time.

In this series, I hope to get myself and you, my reader, a very clear mental model of how git branches work by going into way more details. My understanding is that once a developer has a clear understanding of how git works, every git command suddenly becomes accessible and they can do a much better job of maintaining their code and related workflows.

Branches

Digging Deep into Git with 1 file in a single repository and 11 commits

Recently, I was conducting a session on git and branching and I was trying to explain the mental model. I didn’t do a very good job of it. I found an excellent post by Neil Atkinson called Git branches – Is your mental model wrong?. I tried to use the post, but it didn’t help …

Digging Deep into Git with 1 file in a single repository and 11 commitsRead More »

Straight road ahead

Fixing our mental model of Git Branches; it’s a straight line folks!

Recall From the last part, we learnt that: git tracks your code with a pointer called HEAD When you commit, you create a snapshot of your code with a unique commit ID which is a long alphanumeric string. When you checkout a particular commit, you move the HEAD (git’s pointer) to that commit. You can move …

Fixing our mental model of Git Branches; it’s a straight line folks!Read More »

%d bloggers like this: