Text within angular brackets indicates a user specified word or variable, and should not actually be typed when trying out examples. Text outside of angular brackets should be typed literally i.e. as they appear exactly.
List local branches
git branch
List all branches, local and remote
git branch -a
Create a new branch
git branch <new_branch_name>
Switch to branch
git checkout <new_branch_name>
Create a branch from another branch (i.e. copy files), including from the master branch
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Text within angular brackets indicates a user specified word or variable, and should not actually be typed when trying out examples. Text outside of angular brackets should be typed literally i.e. as they appear exactly.
List local branches
git branch
List all branches, local and remote
git branch -a
Create a new branch
git branch <new_branch_name>
Switch to branch
git checkout <new_branch_name>
Create a branch from another branch (i.e. copy files), including from the master branch
git checkout -b <new_branch_name> <existing_branch_name>
Branches behave just like the master when you change code and commit those changes e.g.
git add .
git commit -m <"message">
git push origin master
git push origin <branch_name>