The working tree contains price.py, test_price.py and notes.txt. Only the first two edits enter the selected staged export for testing and commit; the unrelated note edit remains, and the committed note retains its original bytes.

Small commits tell a coherent story

A useful commit answers one question about the behavior of a repository. It includes the implementation, the checks that establish that behavior, and documentation needed to use it. Smallness means a bounded reason for change, rather than a target number of lines. An inclusive shipping threshold might require edits to both a function and its regression test while leaving an unrelated draft outside the commit. ...

July 25, 2027 · 5 min · XB Field Notes