commitdog branch gives you an interactive menu for all common branch operations. Each subcommand is also available directly so you can jump straight to what you need without going through the menu. Branch names are validated before any git operation runs, and main and master are protected from deletion in all cases.
Commands
commitdog branch
Runningcommitdog branch without any subcommand shows a numbered menu:
q to quit.
commitdog switch
commitdog switch jumps directly to the branch switcher. It shows your current branch and up to five other recent branches by number, plus an e option to type a name:
e to type a branch name manually, or q to quit.
commitdog branch create
commitdog branch create suggests branch names if you have staged changes. Names are derived from the same diff analysis used for commit messages — added function names, file names, and the inferred scope:
commitdog branch delete
commitdog branch delete lists all branches that can be deleted — the current branch, main, and master are never shown. Each branch is labeled (merged) or (unmerged) so you know its status at a glance:
commitdog branch ls
commitdog branch ls prints all local and remote branches. Your current branch is highlighted with an arrow:
commitdog merge
commitdog merge lists all other branches and shows how many lines and files each one adds relative to your current branch. Branches with potential merge conflicts are flagged:
- Choose
1to merge immediately. - Choose
2to view a paginated diff of all changes, then return to the same prompt. - Choose
3to cancel.
$EDITOR ($VISUAL or vi as fallback), so you can resolve them before committing manually.