Appearance
Git
Patterns for committing, resolving conflicts, managing worktrees, and detecting uncommitted changes. Each sub-file is a self-contained guide for a specific git workflow.
Topics
- Commit: Two-command workflow for committing only the changes from the current session or specified files. Use when committing work.
- Conflict Resolution: Strategies for resolving merge conflicts (simple merge, patch replay, and commit replay) while preserving the intent of all commits. Use when facing merge conflicts.
- Git Fundamentals: Core git patterns for daily development: status, diff, log, branching, tagging, stashing, and reset. Use as a reference during any git operation.
- Uncommitted Changes: Detect uncommitted changes and derive path-safe branch names. Use in deployment scripts or CI pipelines that depend on repository state.
- Worktrees: The container layout, one worktree per branch (including
main), with the repository directory holding no checkout. Use when creating, working in, or removing worktrees. - Worktree Migration: Convert a repository from the old root-checkout layout to the container layout in place, preserving every worktree and all uncommitted work. Use when migrating existing repositories.
See also
- GitHub Workflow: Four-phase development process that builds on git operations for feature work with reviewer collaboration.
- Pull Request Workflow: Full PR lifecycle from branch creation through merge verification.