punkrocknerdgirl.com

Git doesn't stand for anything

// build log · field notes · the "wait, what am I actually doing" edition

Git doesn't stand for anything

ErnieI've been git-ing and committing for a month and I do not know what git stands for. I understand ls -la. That's what I remember from before my knees started hurting. I'm really just a monkey punching keys right now.

Ed

Oh Lort. Let's start at the beginning, mee-maw.

Where I was when I stopped

The morning was repo necromancy. My local folder had lost its connection to GitHub, my site had vanished, and Ed walked me through fixing both. When git status finally said nothing to commit, working tree clean, I fist-pumped like I knew what that meant.

I did not know what that meant or what I was typing into Terminal — but boy, was I typing it fast. Faint memories of DOS from the stone ages; this felt similar. I could get this. Get. Git. GIT. WTF does Git stand for? Where I'm from, it's what old women in aprons say to stray dogs. Go on, now — git!

The question

My entire pitch is that I know the systems and the industries I build for. Trucking, construction, QBO — I don't hand a client a tool I can't explain. And there I was, a month deep, running a tool I couldn't explain. I felt like I should probably learn some shit about the shit I'm making. (Duh, bitch. That's your entire philosophy.)

ErnieExplain this to me like I'm a fucking 10-year-old. Or 5. I don't know; what age do kids start coding these days?

Ed

Younger than you'd like. Okay. Git.

It doesn't stand for anything

ErnieSo I finally looked it up. The fact that it's legit a dude naming it after himself as an insult is the greatest naming convention ever.

Ed

Linus Torvalds, 2005, wrote it in about ten days after the Linux team's version-control deal fell apart. "Git" is British slang for an unpleasant person. He named it after himself. Yes, it's great.

I seriously thought I was about to get some insight on why the command is called "git." Turns out — dun dun dun — it's not a command. It's the whole fucking program. And it stands for absolutely nothing. And that's what makes it great.

The thing that made it click

Ed

Forget "upload." Think about your kitchen.

Your project folder is the kitchen. Everything in it — pots, pans, the half-chopped onion — that's your files.

Save (⌘S) is a sticky note. "Added garlic." One note, one thing.

Commit is a Polaroid of the entire kitchen, dated, stuck on the fridge. Every pot, every counter, the onion, frozen. Do that every time something meaningful changes and you get a stack: Monday's kitchen, Tuesday's, Thursday's.

That's the time-machine part. Git can rebuild the kitchen exactly as it looked in any photo. Burned the sauce Thursday? Go back to Wednesday's. Nothing is ever really lost. And Git doesn't re-shoot every pot each time — it looks at the last photo and only notes what changed: "garlic added, pan moved." That's why it's fast.

Push is mailing copies of the Polaroids to your mom's house. That's GitHub. If your kitchen burns down, the photos are still at Mom's.

Git is the camera. GitHub is Mom's fridge. The camera works fine without the fridge. The fridge is bare without the camera.

Ernie…so I've been calling the camera "the fridge" for a month.

Ed

Yes, mee-maw.

What I actually type all day

git status
git add .
git commit -m "why it changed"
git push

Status, photo, caption, mail it to Mom. That's 95% of my day.

The pledge

A month into using what might as well have been dark magic, I realized I'd been throwing ingredients into the pot with zero idea whether it'd taste good, taste like shit, or kill somebody with a nut allergy. Reading the recipe, measuring out jack shit. Breaking my own main rule: don't use tools — or build for industries — you don't actually understand. I don't need to be Julia Child. I should be able to tell flour from sugar.

Once I understood why the flavors went together, the whole thing made sense. So, a pledge: read the recipe and learn the ingredients before I turn on the stove. Lest I make a pot of cabbage water seasoned with cilantro, Tabasco, rocky road ice cream, and bay leaves — and then wonder why the rest of the household has evacuated.