Branches - jsanderson104/GIT-CheatSheet GitHub Wiki
Branches are a "parallel" copy of it's parent branch at a point-in-time. All work/changes within your branch are not affecting the parent branch it was pulled from. Not until "pull request" is submitted, reviewed, approved, and then merged into the main/parent branch.
To see what branch you're currently on and all branch names:
git branch
To create a new branch and switch to it:
git switch -c <branch-name>
The old way was:
git checkout -b <branch-name>
To make a branch and NOT switch to it, do this:
git branch <branch-name>
To delete a local branch:
git branch -d <branch-name>
To delete a remote branch:
git branch -d --remote <branch-name>
To List ALL branches (local and remote):
git branch --list --all