Posts
Git Basics: Transfer a Commit as a Mailbox Patch
A mailbox patch carries a commit message and author information as well as its file changes. This differs from a raw working-tree diff applied without creating a commit. Prepare a …
October 28, 2026
Git Basics: Trace a Line to Its Last Changing Commit
When one configuration value looks surprising, inspect the history of that line before reading the entire file history. A two-commit fixture demonstrates a narrow blame query. …
October 28, 2026
Git Basics: Summarize Commit Authors in a Chosen Range
A release report often needs a compact list of contributors. shortlog groups commits by author, and an explicit revision prevents accidental reliance on standard input. Prepare a …
October 28, 2026
Git Basics: Separate Tracked, Untracked, and Ignored Paths
A directory listing mixes files with different Git states. Query the index and the untracked set separately to see what a packaging or inspection script would include. Prepare a …
October 28, 2026
Git Basics: List a Committed Snapshot Without Checking It Out
A build audit may need the files in a commit even when the working tree contains edits. ls-tree reads the saved tree directly, leaving the current checkout alone. Prepare a scratch …
October 28, 2026
Git Basics: Find Commits That Add or Remove a Specific String
A setting may have existed under several values. Pickaxe searches changes in a string occurrence count, while a diff-regex search can find value edits that keep that count …
October 28, 2026
Git Basics: Count Commits Unique to Each Branch
Branch divergence is easier to reason about as two sets of reachable commits. Use a controlled fork to distinguish a two-dot exclusion range from a three-dot symmetric difference. …
October 28, 2026
Git Basics: Check Whether a Branch Contains an Ancestor
Before assuming a branch includes a particular base, ask Git about ancestry. A diverged fixture shows why a common ancestor and a branch tip are different concepts. Prepare a …
October 28, 2026
Git Basics: Build an Explicit Local Branch Inventory
A script can list branches with a stable field selection instead of parsing the human-oriented branch display. for-each-ref also lets you restrict the namespace being inspected. …
October 28, 2026
Git Basics: Attach Local Review Notes Without Rewriting a Commit
A local annotation can record review context while preserving the annotated commit ID. Git notes store that extra text under a separate ref. Prepare a scratch directory Tested on …
October 28, 2026