Skip to content

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 everyday 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: Separate working directories per branch sharing one repository. Use when you need multiple branches checked out simultaneously.

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.