Hi, I'm Eric.
I’m an avid world traveler, photographer, software developer, and digital storyteller.
I help implement the Content Authenticity Initiative at Adobe.
Hi, I'm Eric.
I’m an avid world traveler, photographer, software developer, and digital storyteller.
I help implement the Content Authenticity Initiative at Adobe.
18 September 2025
Like almost everybody these days, I keep my source code in Git (including this web site).
Here are a few Git-related habits I’ve developed over time that work well for me:
I’ve gotten into the habit of using Conventional Commits syntax in most of my projects. It plays nicely with the release automation tools I use and I find the structured format makes it easier to write good commit messages.
For commit titles, I follow the same approach I mentioned in Titles and captions — they don’t need to be complete sentences.
This ties back to my general philosophy about things doing one thing, but it applies to Git too. I’ve found that commits and pull requests are easier to review — and understand later — when they stick to one main purpose.
If I catch myself writing a commit message with “and” in it — like “Fix the parser and refactor some tests” — I take that as a sign that I should split things up.
In most of my projects (websites are generally an exception), I do my work in pull requests.
I’m pretty heavy on automation (maybe I’ll write about that someday), and PRs give me a chance to see how my changes will behave before they hit the main branch.
When I merge a pull request, I almost always use a squash commit. I find the details of how I got to the end result of the pull request just add noise to the history.
| Don’t worry — GitHub keeps all those individual commits around even after you squash a pull request. You can always un-delete the pull request branch if you need to dig into what happened during development. I’ve found it reassuring to know that safety net exists, even though I’ve rarely needed to use it. |
There are a few cases where I skip the squash and do a regular merge instead:
Long-running maintenance or release branches that need to stay in sync with main — those get merged with a merge commit to preserve the commit history and any release tags that might have been added along the way.
When I’m pulling in commits from another project that I track over time, like in my asciidoc-parser project where I want to keep a clear connection to the upstream project.
I’ve found it’s cleaner to think of Git repos as being one of two things: either source code (the recipe) or the finished product (what I’m building) — but not both at once. Whenever possible, I avoid setups where build artifacts get committed back into the same repo as the code that created them.
Take this website as an example: the GitHub repo contains all of the Asciidoc source files and the Antora configuration, but the actual HTML, CSS, and JavaScript that make up the live site? Those get built and published separately.
Subscribe to my free and occasional (never more than weekly) e-mail newsletter with my latest travel and other stories:
Or follow me on one or more of the socials: