Menu

1 / 5

🌳 Git is just a few kinds of pointers. Here's a page that lets you watch them move

DEV Community: githubĀ·Shubham ChaudharyĀ·about 2 hours ago
#F0MWLyfV
#devtogithub#technology#devto#dev#commit
Reading 0:00
15s threshold

Git commands used to feel like spells to me. Say the right words and it works. Say the wrong ones and something breaks, and you have no idea why.

What finally fixed that wasn't another cheat sheet. It was seeing what each command does to the picture . So I built a page for myself that draws it, and then I made it public:

šŸ‘‰ git-drawn-out.vercel.app

It's free, has no sign-up, and works on a phone. The source is on GitHub under the MIT license.

The whole idea: four things

Almost everything in Git is a combination of four ideas:

Commit. A snapshot of every tracked file, plus the ID of its parent. Arrows point backwards: a child knows its parent, never the other way round.

Branch. A sticky note holding one commit ID. Committing moves the note forward. Creating a branch copies nothing.

HEAD. "You are here." It normally points at a branch, and that branch is the one that moves when you commit.

origin/main. Your repo's memory of where the server's main was the last time you talked to it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.