Creating a New Branch
Last Updated
August 16, 2026
A guide for creating a new branch in a git repository.
Creating a New Branch
- Navigate to git repo:
cd REPO
- Create new branch:
git checkout -b NEW-BRANCH
- Push new branch:
git push origin NEW-BRANCH
(Optionally) Create a Branch from a Specific Commit
git checkout -b NEW-BRANCH HASH
Swap Between Branches
git checkout BRANCH-NAME
