| name | dev |
| description | Switch to the dev branch, creating or resetting it from master as needed |
| disable-model-invocation | true |
| allowed-tools | Bash(git *) |
Switch to dev branch
Current state
!git branch --show-current
!git status --short
Instructions
- If there are uncommitted changes, warn the user and stop.
- If already on
dev and it's up to date with master, say so and stop.
- If a local
dev branch exists:
- Check if it has unmerged commits vs
master. If yes, just switch to it.
- If it's already merged (i.e. no commits ahead of master), reset it from master.
- If no local
dev branch exists, create it from master:
git checkout -b dev master
git push -u origin dev
- Confirm the branch switch.