git-branching
Git Branching
Overview
Use this skill after the work is implemented and freshly verified, when the feature branch is ready to be aligned with its target branch and finalized.
Determine the target branch from the PR base or explicit task context; do not assume it is main. Treat PR creation as the first finish milestone. After the PR exists, prepare the feature branch against origin/<target-branch>, decide whether regression verification must be rerun, and merge from the checkout holding the target branch only when authorized.
- Default base branch for top-level work: explicit user/repository target; otherwise stop rather than guessing.
- Default base branch for delegated child work: the parent task branch.
- Default purpose: isolation for meaningful implementation work.
Use a 15-second wall-clock timeout for direct gh operations by default.
Git naming and commits
Follow the target repository's Git instructions when they are stricter or more specific. Otherwise, use these defaults. Do not rename existing branches or amend, squash, or otherwise rewrite existing commits merely to satisfy these conventions unless explicitly asked.
When finalization requires creating or naming a feature, PR, or worktree branch, choose and validate this form: