Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(scripts): improve git branch creation error handling
- Capture git checkout -b stderr for meaningful error reporting
- Skip redundant checkout when already on target branch
- Surface actual git error messages instead of generic fallback

Applies to both bash and PowerShell create-new-feature scripts.
  • Loading branch information
grafvonb committed Apr 4, 2026
commit d30f54b483a02d308764fc63f40cb2264586a54e
3 changes: 3 additions & 0 deletions scripts/bash/create-new-feature.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ if [ "$DRY_RUN" != true ]; then
fi
exit 1
fi
else
# Show normal git output (e.g., "Switched to a new branch '...'")
[ -n "$branch_create_error" ] && >&2 printf '%s\n' "$branch_create_error"
fi
else
>&2 echo "[specify] Warning: Git repository not detected; skipped branch creation for $BRANCH_NAME"
Expand Down