# create a new branch from a commit
git checkout -b new_branch_name commit_hash
# create a new branch based on another branch
git checkout -b new_branch_name existing_branch_name
git push -u origin branch_name
git push -u origin branch_name --force
# rename currently local branch
git branch -m old_branch new_branch
push renamed branch to remote and delete the one on remote
git push origin -u new_branch
git push origin --delete old_branch
git branch -d branch_name
git branch -D branch_name
git push origin --delete branch_name