CmdID

CmdID / Commands

git-branch

Main Git command for working with branches. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

List all branches (local and remote; the current branch is highlighted by *)

git branch --allIdentify

List which branches include a specific Git commit in their history

git branch --all --contains commit_hashIdentify

Show the name of the current branch

git branch --show-currentIdentify

Create new branch based on the current commit

git branch branch_nameIdentify

Create new branch based on a specific commit

git branch branch_name commit_hashIdentify

Rename a branch

git branch --move old_branch_name new_branch_nameIdentify

Delete a local branch (you must switch to a different branch before doing this)

git branch --delete branch_nameIdentify

Delete a remote branch

git push remote_name --delete remote_branch_nameIdentify