Skip to main content

create-a-git-branch

Create a Git branch from the intended base while preserving existing changes, naming scope clearly, and verifying upstream state. Use when work needs an isolated line of development.

Source facts

Repository
protosphinx/sphinxstack
Last source activity
July 29, 2026 at 13:55
Detected SKILL.md language
English
Stars
3
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
2 files

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
create-a-git-branch
category
code
description
Create a Git branch from the intended base while preserving existing changes, naming scope clearly, and verifying upstream state. Use when work needs an isolated line of development.
# create-a-git-branch Inspect current state before changing branches. ## When to use - Use for feature, fix, experiment, release, or review work that should not occur on the current branch. - Do not discard, overwrite, or silently include another person's dirty or untracked work. ## Procedure 1. Inspect repository root, current branch, status, worktrees, remotes, and untracked files. 2. Confirm intended base and whether it must be refreshed from the remote. 3. Separate or preserve unrelated work through an approved worktree, commit, or stash strategy. 4. Choose a short branch name that reflects scope and repository convention. 5. Create the branch from the exact intended commit without rewriting shared history. 6. Verify branch name, HEAD, upstream expectation, and worktree status. 7. Record the base commit and planned validation in the task or pull request. ## Done - A new branch points to the verified intended base and preserves all preexisting files and changes - Branch name, HEAD commit, worktree status, and upstream plan are checked and recorded
View on GitHub