Things I Check Before Opening a PR

What is a programmer but a series of PRs (pull requests)? I optimize PRs to introduce the best code I can, be easy to review, and document my work so I can make sense of it in the future. Here are some things I always check before opening a PR. ...

February 7, 2026 · Jake Worth

Git Porcelain and Plumbing 🚽

Git has two kinds of commands: “porcelain” and “plumbing”. ...

January 26, 2026 · Jake Worth

Timestamped Branch

Git prevents branches with the same name. But sometimes, I want to re-use a name! Here’s my workaround. ...

November 20, 2025 · Jake Worth

Why Keep Binaries Out of Version Control

“Keep binaries out of version control” is a truth I’ve always held, but I recently learned more about why. ...

November 20, 2025 · Jake Worth

Git Apply a Commit in Reverse

Sometimes I’ll be looking at a Git commit online, and want to put my dev environment in a world where the commit is un-applied. This can be achieved by applying it in reverse. ...

July 30, 2025 · Jake Worth

Show How A File Is Ignored In Git

Today I solved a mystery: a file was being Git-ignored in a new project that didn’t have a .gitignore. Here’s me learning this by trying and failing to add it: $ git add destroy.sh The following paths are ignored by one of your .gitignore files: destroy.sh This output tells me some .gitignore is telling Git to ignore my script. Another way to confirm this is the check-ignore command: $ git check-ignore destroy.sh destroy.sh The output here is the match; a file named destroy.sh is indeed being ignored. But how? We can answer that question with the -v flag: ...

May 31, 2024 · Jake Worth

Apply a Patch in Reverse

Need to undo a code change? You could revert. Or, you could apply the patch without creating a commit. That’s what I want to do much of the time. Use git apply with the -R (reverse) flag: git show 8cc13b1 | git apply -R All the changes from 8cc13b1 get applied to your working directory. In a large commit, do this tactically by limiting to just one file or directory. git show 8cc13b1 src/fileToRevert.ts | git apply -R

March 24, 2023 · Jake Worth

How to Identify the Breaking Commit With Git Bisect

Some code is broken, and you can’t figure out why. Maybe there are a lot of changes, and identifying the breaking change seems impossible. Or, maybe you’re curious about how things break in your organization. The tool you need is git-bisect. ...

May 17, 2022 · Jake Worth

Commit Part of a File in Git

You’ve been working on a big set of changes, and haven’t committed to Git yet. Now, you want to commit some, but not all, changes to a file. Let’s look at adding patches. ...

May 6, 2022 · Jake Worth

Force with Lease

When I rebase, I force-push altered history using the flag --force-with-lease instead of the commonly-used --force. git push --force-with-lease But why? This is a TIL for me because I’ve used this command for years without reading the docs. Take it away, docs: This option allows you to say that you expect the history you are updating is what you rebased and want to replace. If the remote ref still points at the commit you specified, you can be sure that no other people did anything to the ref. ...

November 5, 2021 · Jake Worth

Don’t miss my next essay

Hear from me immediately when I post: no ads, unsubscribe anytime.