github switch branch to master code example

Example 1: make a new branch git

git checkout -b branch-name

Example 2: how to switch between two branches in git

git switch my_branch

Example 3: git change branch

git checkout <>

Example 4: git change branch

$ git branch iss53
$ git checkout iss53

Example 5: create new branch git

$ git checkout --track origin/newsletter
Branch newsletter set up to track remote branch newsletter from origin.
Switched to a new branch 'newsletter'

Tags:

Misc Example