Skip to main content

git

Better Bots via Hooks

·393 words·2 mins
AI git
Getting an AI agent to follow every repo convention through AGENT.md files and skill instructions can be a slog, and it won’t always comply. A git pre-commit hook enforces the rules for you — no commits to main, no committing files that shouldn’t change, and tidying and linting before anything lands.

Oops! I just broke git-bisect

·908 words·5 mins
git
I rarely use git-bisect, but thinking about it has changed how I structure my commits. The principle is simple: don’t break git-bisect. If a change breaks something, the fix should belong in that same change. This mental model helps avoid common anti-patterns like splitting a bug fix into two commits—one with a failing test, one with the fix. Even if you never run bisect, thinking “would this commit work in isolation?” creates a provably linear set of working changes rather than an aspirational attempt at correctness.

One Line Fuzzy Find for Git Worktree

·694 words·4 mins
fzf git awk bash
Let’s explore how to create a one-liner for fuzzy matching when navigating git worktrees. The ideas demonstrated here can be used to solve many more types of problems beyond worktrees and even git.

Using Tig to Make Sense of Git

·1187 words·6 mins
git Tig TUI
If you work with Git as your version control system, you’ve likely already resigned yourself to the fact that it’s a complicated beast. Git is a fantastic tool, but it can be cumbersome to navigate repositories, logs, the stash, etc. That’s where a tool like Tig comes in.

4 Strategies for Context Switching in Git

·1257 words·6 mins
git worktree
Anyone who spends a lot of time working with Git will eventually need to do some form of context switching. Sometimes this adds very little overhead to your workflow, but other times, it can be a real pain. Let’s discuss the pros and cons of some common strategies for dealing with context switching.

Autocorrecting my Git Commands

·597 words·3 mins
git bash autocorrect
I’m going to show you a couple of handy tricks that I use to help Git “Do What I mean”.