Skip to content

Branch

Local

git branch -a                           # list all branches
git branch -c <branch_name>             # create a new branch
git branch -d <branch_name>             # delete a local branch
git branch -D <branch_name>             # force delete branch locally

Remote

git push origin <branch-name>           # push branch to remote
git push origin --delete <branch-name>  # delete branch from remote