⌘K
Options (3)
-a, --allbooleanList all branches (local and remote; the current branch is highlighted by `*`)
Example:
git branch {{[-a|--all]}}-m, --movebooleanRename a branch (you must switch to a different branch before doing this)
Example:
git branch {{[-m|--move]}} {{old_branch_name}} {{new_branch_name}}-d, --deletebooleanDelete a local branch (you must switch to a different branch before doing this)
Example:
git branch {{[-d|--delete]}} {{branch_name}}Examples (8)
List all branches (local and remote; the current branch is highlighted by `*`)
git branch [-a|--all]List which branches include a specific Git commit in their history
git branch [-a|--all] --contains commit_hashShow the name of the current branch
git branch --show-currentCreate new branch based on the current commit
git branch branch_nameCreate new branch based on a specific commit
git branch branch_name commit_hashRename a branch (you must switch to a different branch before doing this)
git branch [-m|--move] old_branch_name new_branch_nameDelete a local branch (you must switch to a different branch before doing this)
git branch [-d|--delete] branch_nameDelete a remote branch
git push remote_name [-d|--delete] remote_branch_namemade by @shridhargupta | data from tldr-pages