Git Algorithms
Lines that fork and meet again — branching and merging. Learn the 3 topics below step by step with interactive visualizations.
A branch does not copy commits. It is a label pointing at a single commit, so creating one costs nothing — and the line forks only once you move that label on its own. When the lines meet again, choosing between fast-forward, merge commit, squash and rebase is really choosing what shape to leave in the history, and that shape sets how hard it will be to undo later.
fast-forward · merge · squash · rebaseWorking alone, nothing stands between a commit and production. That is not because you skip review but because there is nowhere for a review to stand, and a branch is the device that creates that place. Once AI writes the code a solo developer gains a reviewer for the first time — but handing that review to the session that wrote the code makes both fields of view coincide, so they miss the same things.
gates · AI review · CIThe branch picture barely changes as a team grows. What changes is what stands in front of the merge — and once AI writes the code, output multiplies while reading speed stays put, so a queue forms in front of approval. Adding approvers does not catch up; narrowing where human attention is spent does.
two-stage review · merge queue · provenance