A terminal hashing a file with git hash-object, above the post title

Your .git Folder Is a Database. Let's Read It.

Every Git repo has a hidden .git folder. Most people never open it. That’s where all of Git lives: every version of every file, every branch, every commit message. And it’s surprisingly simple once you look. Let’s take it apart. Setup Make a throwaway repo so we can poke at it safely: mkdir git-internals && cd git-internals git init -b main echo "hello" > hello.txt git add hello.txt git commit -m "first commit" Now look inside: ...

October 15, 2026 · 5 min · Londopy
A terminal running git bisect run to find the first bad commit, above the post title

git bisect run: Let Git Find the Bug for You

It worked last month. It doesn’t work now. There are 400 commits in between. You could read them all. Or you could let Git find the guilty one in about nine steps. The idea: binary search through history git bisect takes two points: a commit where things were good and one where they’re bad. It checks out the commit halfway between and asks you which it is. Then it throws away the half that can’t contain the bug and repeats. ...

October 8, 2026 · 4 min · Londopy
A terminal running git worktree commands, above the post title

git worktree: Stop Stashing, Start Branching in Parallel

You’re halfway through a feature. Files are open, tests are half-written, nothing compiles. Then someone says: “Production is broken, can you look?” Most people do one of these: git stash, switch branches, fix, switch back, git stash pop, pray. Commit a “WIP” mess they’ll have to clean up later. Clone the whole repo again into another folder. There’s a better option that has been in Git since 2015: worktrees. What a worktree is A normal repo has one working directory: the folder where your files live. A worktree is an extra working directory attached to the same repo. Each one can have a different branch checked out, and they all share the same history, objects, and remotes. ...

October 1, 2026 · 4 min · Londopy
A terminal printing a .gitattributes file, above the post title

The Best Git Feature You've Never Used

Every repo has a .gitignore. Almost nobody has a .gitattributes. That’s a shame, because this one small file controls how Git sees, diffs, merges, normalizes, and exports your files. Once you know what it can do, you’ll want one in every project. What it is .gitattributes is a plain text file that assigns attributes to paths. Each line is a pattern followed by one or more attributes: *.sh text eol=lf *.png binary docs/** linguist-documentation The patterns work much like .gitignore, with two catches. Negation (!pattern) isn’t allowed. And a directory pattern like vendor/ does not apply to the files inside it, so you need vendor/**. ...

September 24, 2026 · 7 min · Londopy