# Git Branch

> Manage git branches with listing, creation, deletion, and rename operations.

- Skill: `andersonlimahw/git-branch` (Agent Skill)
- Install (CLI): `npx skillmds@latest add andersonlimahw/git-branch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/andersonlimahw/git-branch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Andersonlimahw (https://skillmd.com/u/andersonlimahw)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/andersonlimahw/git-branch

---


# Git Branch Skill

Create, list, rename, and delete branches across local and remote.

## Capabilities
- List branches: `git branch`
- List all (including remotes): `git branch -a`
- List with last commit: `git branch -v`
- List merged branches: `git branch --merged`
- List unmerged branches: `git branch --no-merged`
- Create branch: `git branch <name>` or `git branch <name> <start-point>`
- Create and switch: `git checkout -b <name>` or `git switch -c <name>`
- Delete branch: `git branch -d <name>` (safe)
- Force delete: `git branch -D <name>` (unmerged)
- Rename branch: `git branch -m <old> <new>`
- Move branch: `git branch -M <old> <new>` (force rename)
- Set upstream: `git branch -u <remote>/<branch>`
- Show current branch: `git branch --show-current`
- Delete remote branch: `git push origin --delete <branch>`

## Usage
Triggered when user says "branch", "create branch", "list branches", "delete branch", "rename branch".
Always check current branch before deleting. Warn about deleting unmerged branches.

