speckit.git.feature
Creates and switches to a feature branch for a specification, with sequential or timestamp numbering.
- Kind
- Prompt
- Works with
- Claude Code, Codex, GitHub Copilot, Cursor, Windsurf / Devin, Cline
- Source
- github/spec-kit @ c00dc0551583
- Path
- extensions/git/commands/speckit.git.feature.md
- License
- MIT
- Jobs
- Git workflow
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Create Feature Branch Create and switch to a new git feature branch for the given specification. This command handles **branch creation only** — the spec directory and files are created by the core `__SPECKIT_COMMAND_SPECIFY__` workflow. ## User Input ```text $ARGUMENTS ``` You **MUST** consider the user input before proceeding (if not empty). ## Environment Variable Override If the user explicitly provided `GIT_BRANCH_NAME` (e.g., via environment variable, argument, or in their request), pass it through to the script by setting the `GIT_BRANCH_NAME` environment variable before invoking the script. When `GIT_BRANCH_NAME` is set: - The script uses the exact value as the branch name, bypassing all prefix/suffix generation - `--short-name`, `--number`, and `--timestamp` flags are ignored - `FEATURE_NUM` is extracted when the final path segment starts with a numeric or timestamp feature marker (for example `042-name`, `feat/042-name`, or `jdoe/app/042-name`), otherwise set to the full branch name ## Prerequisites - Verify Git is available by running `git rev-parse --is-inside-work-tree 2>/dev/null` - If Git is not available, warn the user and skip branch creation …