Skip to content

Commit f0434ad

Browse files
fix: gracefully handle existing release branches
1 parent 1a7ac07 commit f0434ad

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ adheres to [Semantic Versioning](https://semver.org/). Work in progress lives un
1414
configured tag convention instead of an implicit package-scoped format.
1515

1616
### Fixed
17+
- **version** — Modified `git checkout -b` to `git checkout -B` so that release branch creation gracefully handles previously abandoned branches by resetting them instead of crashing.
1718
- **version** — Removed the startup `gh` confirmation prompt and moved confirmation to a final
1819
review that shows the computed plan, changed files, and full git diff before commit/push/PR.
1920
- **init/npm** — npm workspace discovery now skips workspace manifests that are not release

crates/core/src/git.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl GitOps for GitRepo {
114114
}
115115

116116
fn create_branch(&self, name: &str) -> Result<()> {
117-
run_git(&self.root, &["checkout", "-b", name]).map(|_| ())
117+
run_git(&self.root, &["checkout", "-B", name]).map(|_| ())
118118
}
119119

120120
fn checkout_branch(&self, name: &str) -> Result<()> {

0 commit comments

Comments
 (0)