Long-form deep-dives on Git internals, recovery, and the commands you only learn after losing work twice. Each post deep-links into a scenario or lesson so the theory lands with a real terminal underneath.
Git 2.55 landed on 29 June 2026. Most of it is under-the-hood speed, but a handful of user-facing changes are worth learning today: git history fixup, a safer git checkout -m, fsmonitor on Linux, parallel hooks, and remote-group push. Verified against the official release notes.
How to undo a Git commit safely. Choose between git reset and git revert, keep or discard your changes, and learn the one rule that decides which to use once you have pushed.
Undo a Git rebase and recover the pre-rebase state. Use git reset --hard ORIG_HEAD for the fast undo, git reflog when it is gone, and git rebase --abort mid-conflict.
git stash pop left conflict markers? Your stash is safe — a conflicted pop never drops it. Undo the pop cleanly, or resolve and keep, with exact commands.
Rebase a stack of branches at once with git rebase --update-refs. Keep every stacked PR branch pointer in sync, the config to make it default, and how to push safely after.
A merge conflict is not an error — it is Git asking you to decide. Learn the base/ours/theirs model, the conflict markers, and why ours and theirs swap between merge and rebase.
Six things I believed about Git that were just wrong — commits as diffs, rebase as dangerous, branches as heavy. Fixing the mental model is what finally made Git click.
Committed with the wrong git config — work email instead of personal, or your old name? Here are the exact commands to fix the author of one commit, of several commits, and to prevent it ever happening again.
Five commits ready to push, but in the wrong order for review? Here is exactly how git rebase -i reorders commits, what happens when reordering hits a conflict, and when you should and should not reorder.
Deleted a Git branch by mistake? The commits live on for ~90 days. Here are the exact reflog and git fsck commands to bring a deleted branch back, with realistic walkthroughs.
Every commit you've ever made is recoverable for at least 30 days, even after a hard reset, a bad rebase, or a deleted branch. Here's how reflog works and the exact commands to bring lost work back.
Trunk-based, Gitflow, GitHub Flow, GitLab Flow, Release Flow — five workflows, three questions about your team, one matrix that tells you which to use. With evidence and real examples.
Gitflow has a bad reputation online, but it still earns its weight for versioned SDKs, regulated industries, and long support windows. Here is when it is right, and when it is wrong.
A team that tried to migrate from Gitflow to trunk-based development overnight ground to a halt for three weeks. Here is a realistic five-phase playbook that takes 2 to 4 months.
A 5 GB monorepo with a 14-minute clone is fixable. Sparse checkout, partial clones, commit-graph, and fsmonitor — practical Git techniques for monorepos at scale.
Three honest approaches to sharing code across many repos — Git submodules, Git subtrees, and internal package registries. When each fits, and the pitfalls of each.
A hotfix shipped to prod but never made it back to develop, then got reverted three weeks later. Here is how release branches and hotfix workflows actually work without losing commits.
The Git workflow that worked at 5 engineers breaks at 30, and the one that works at 30 is overkill at 5. Here is what changes at each team-size boundary, with concrete examples.
Trunk-based development works for teams that have automated tests, feature flags, and a fast review culture. Without those, it hurts. Here is when TBD wins, when it loses, and why.