11ai Git branches
Manage local branch names and pointers as a standalone operation. This skill handles the branch command itself, not an end-to-end branch-and-pull-request task.
Inspect
git branch --show-current
git status --short --branch --untracked-files=all
git branch -vv --sort=-committerdate
git log --oneline --decorate -n 8
Before switching, identify staged and unstaged work and confirm that the target branch exists or the requested starting point is explicit. Never hide dirty work with a stash unless the user asked for that separately.
Common operations
git branch --list
git switch --create TOPIC START_POINT
git switch EXISTING_BRANCH
git branch --move NEW_NAME
git branch --delete BRANCH
Use git switch --create rather than legacy checkout for a new branch. Preserve the repository's branch naming convention and prefer a short, specific name. git branch --delete refuses to remove an unmerged branch; do not replace it with -D without explicit confirmation after showing the branch tip and merge status. Remote branch deletion belongs to 11ai-operator-git-sync and must never be inferred from deleting a local branch.
Verify
git branch --show-current
git status --short --branch --untracked-files=all
git branch -vv
Report the old and new branch, starting point, upstream tracking, and any work that prevented or remained outside the operation.