-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Feature: Add ability to tell specify to use the current branch instead of making a new one #1117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature: Add ability to tell specify to use the current branch instead of making a new one #1117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new SPECIFY_USE_CURRENT_BRANCH environment variable that allows users to work with existing git branches that don't follow the ###-name convention. When set, the scripts will use the current git branch name instead of creating a new feature branch.
- Adds
SPECIFY_USE_CURRENT_BRANCHenvironment variable support across bash and PowerShell scripts - Updates branch detection logic to respect the new variable while maintaining priority chain
- Skips branch pattern validation when using current branch mode
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/powershell/create-new-feature.ps1 | Adds logic to use current branch instead of creating new one when env var is set |
| scripts/powershell/common.ps1 | Integrates env var into branch detection and validation functions |
| scripts/bash/create-new-feature.sh | Mirrors PowerShell changes for bash environment |
| scripts/bash/common.sh | Adds env var support to bash common functions |
| README.md | Documents the new environment variable in configuration table |
| CHANGELOG.md | Records the new feature addition with examples |
| AGENTS.md | Documents environment variables section with the new option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for adding this, I have been waiting for something like this to be released into spec-kit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find obvious issue. The comments made by CoPilots seems not useful.
Added the ability to set SPECIFY_USE_CURRENT_BRANCH=1 to have speckit use your current branch for specs instead of making a new one.
This is extremely useful for teams that already have their own way of branching, and don't want to have more branches get created for no reason.
I have gone through and tested the full flow on MacOS.
Closes #1104
Some of the code was edited by Claude Code.