How do you branch?
The default branch in a git repository is called master
.
To create a new branch use
git branch
To see a list of all branches in the current repository type
git branch
If you want to switch to another branch you can use
git checkout
To create a new branch and switch to it in one step
git checkout -b
To delete a branch, use
git branch -d
To create a branch with the changes from the current branch, do
git stash
git stash branch