1.5 KiB
1.5 KiB
description, shortcut, category, difficulty, estimated_time, version
| description | shortcut | category | difficulty | estimated_time | version |
|---|---|---|---|---|---|
| A new feature branch | gsn | utility | beginner | instant | 1.0.0 |
Create a new feature branch from main and ensure safe development practices. Required branch name: $ARGUMENTS
Follow these steps:
- Check current git status and warn if there are uncommitted changes
- Ensure we're not already on main branch (if we are, that's fine, we'll create from main)
- Switch to main branch:
git checkout main - Pull latest changes:
git pull origin main - If no branch name provided in $ARGUMENTS, suggest branch name based on:
- Current date (format: YYYY-MM-DD)
- Common prefixes: feature/, fix/, chore/, docs/
- Ask me to confirm or specify different branch name
- Use provided branch name from $ARGUMENTS or the confirmed suggested name
- Create and switch to new branch:
git checkout -b [BRANCH_NAME] - Show current branch status:
git branch --show-current - Show git status to confirm clean working directory
- Remind about best practices:
- Keep commits small and focused
- Use conventional commit messages (feat:, fix:, chore:, docs:)
- Regularly push to remote with:
git push -u origin [BRANCH_NAME] - Use
/release-versioncommand when ready to merge to main
Safety checks:
- Warn if already on a feature branch and ask for confirmation
- Warn if uncommitted changes exist and suggest stashing or committing first
- Prevent accidental work directly on main branch
- Ensure main is up to date before branching