Merge retains commits B and U and creates M with both as parents. Rebase recreates B as B-prime after U, giving it a new identity.

Merge and rebase draw different history lines

Merge and rebase integrate work with different consequences for commit identity and ancestry. A merge normally retains the existing commits and joins their histories; a rebase transplants selected changes onto another base. The choice is not only how a graph looks. It affects review references, conflict handling, signatures, and collaborators who already depend on the old commits. Decide using the repository’s workflow and the actual branch relationships. ...

January 18, 2028 · 5 min · XB Field Notes
Merge M names the former current tip C as first parent and incoming I as second. Clean textual integration does not prove correct behavior.

Git merge joins two diverged lines at a new commit

A merge connects histories and records a resulting project snapshot. In an ordinary merge of two diverged branches, the new commit names both prior tips as parents. Those parent links keep the earlier commits reachable, but they do not prove that the resulting files retain every intended behavior. Merging is both a graph operation and a content decision; verifying only one of those aspects leaves important mistakes undetected. ...

December 29, 2027 · 5 min · XB Field Notes
Default saves tracked changes and index; -u adds untracked files; -a adds ignored files. Filled marks show inclusion.

git stash saves work for later

Git stash records selected uncommitted work so a checkout can temporarily return to an earlier committed state. It is useful for a short interruption, but neither saving nor restoring is an unconditional promise about every file in the directory. The important questions are what was included, which base the work came from, what state the destination now has, and when the saved entry can be removed. ...

December 11, 2027 · 6 min · XB Field Notes
Ordinary committing cherry-pick: source S points to parent P, and result R points to target T. The dashed P-to-S patch transfer to R is not an ancestry link; S remains in its source history.

git cherry-pick re-applies a commit

Cherry-pick applies the change introduced by a selected commit to the current line of development. It is useful for a targeted backport when an older release needs one fix without the rest of a development branch. It does not move or delete the source commit, and it does not establish a merge relationship with the source branch. The target result must be reviewed as a change in its own environment. ...

November 25, 2027 · 5 min · XB Field Notes
Excluding /build/ blocks keep.txt even with a negation. Excluding /build/* leaves the parent traversable and lets the child exception work. Tracked files remain tracked.

.gitignore controls untracked paths

Git ignore rules influence which untracked paths ordinary discovery and add operations consider. They are useful for generated files, editor state, and local configuration. They do not create an access-control boundary, remove a file already in the index, or erase earlier commits. Treat the ignore file as a project convention with observable matching rules, not as a guarantee that a sensitive file cannot enter history. ...

November 15, 2027 · 5 min · XB Field Notes
A feature band preserves staged, unstaged and untracked work while a separate hotfix starts at release commit B, reproduces failure, then passes after repair.

Use a worktree for a hotfix without disturbing a feature

A hotfix need not displace unfinished feature work from its directory. A linked worktree can start from a chosen release commit while the original directory retains its staged changes, unstaged edits, and untracked files. The workflow succeeds when the fix is tested on the correct baseline and the original work remains intact. Merely creating a second folder does not establish either result. ...

November 6, 2027 · 6 min · XB Field Notes
Good revision 0 and bad revision 6 bound unknown ancestry candidates. Child-to-parent arrows connect revisions. Retest the candidate and parent; skipped revisions can leave a set.

git bisect narrows the first bad commit

Bisection answers a precise historical question: within selected history, where does a reproducible observation change from good to bad? It does not identify a root cause merely by naming a commit. The search depends on correct endpoint labels and consistent intermediate decisions. Treat the reported boundary as evidence to inspect, then confirm the behavior on both sides and explain the change that accounts for it. ...

October 24, 2027 · 6 min · XB Field Notes
One shared repository connects to main and review. Both retain their own HEAD, index and working files.

Git worktrees share a repository, not a checkout

A linked worktree gives one Git repository another working directory, with its own checked-out state. That lets a feature, release, or review stay open alongside other work without repeatedly replacing the same files. The useful boundary is separate working files and staging, not complete isolation. Objects, many references, and ordinary repository configuration are shared, so operations need to respect both the local workspace and the common repository. ...

July 26, 2027 · 5 min · XB Field Notes