Skip to content

Latest commit

 

History

History
27 lines (13 loc) · 545 Bytes

File metadata and controls

27 lines (13 loc) · 545 Bytes

git branches commands reference

git branch

Shows you your branches

git branch list local branches

git branch -r list remote branches (the branches on GitHub)

git branch -a list all branches, local and remote

git checkout

Note: git checkout has been largely replace by git switch

git checkout -b <branch> make a new branch

git checkout <branch>

git switch

git switch -c <new_branch_name> make a new branch and switch to it

git switch <branch_name> switch to working on a different branch