git checkout -b branch1
This code creates a branch named 'branch1'. This branch will include everything that was in the branch that was originally in use, in this case, the master branch!
git push origin branch1
This code is the same as before, however this time, the final word is 'branch1' indicating that the commit should be pushed to the branch named 'branch1'.
git merge branch1
This code will merge the contents of the specified branch, in this case branch1, with the branch that is active.
git checkout -b branch2
This code creates another branch from the master branch (assuming this is the active branch
git branch -d branch2
If the code is broken during development, the branch can be deleted, meaning that the main branch is not affected. Using this code allows you to revert back to the code that is working easily.