Follow our step-by-step guide to create a new GitHub branch using both the web UI and Git CLI, and easily verify your branch setup.
Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
Step 1: Navigate to Your Repository on GitHub
First, open your web browser and go to https://github.com. Sign in with your GitHub credentials.
Locate the repository where you want to create a new branch:
Step 2: Open the Branch Dropdown
Once you’re on the repository’s main page:
Step 3: Create a New Branch from the Web UI
Inside the branch dropdown:
feature/add-login
).Your new branch will be created immediately, and GitHub will switch you to that branch.
Step 4: Verify Your New Branch
After creation:
feature/add-login
).
Step 5: Create a Branch Locally Using Git CLI
If you prefer using the command line, open your terminal or command prompt and run:
git clone https://github.com/username/repo.git
cd repo
git checkout -b feature/add-login
git push -u origin feature/add-login
git clone
downloads the repository to your machine.git checkout -b
creates and switches to the new branch locally.git push -u origin
uploads the branch to GitHub and sets the upstream.
Step 6: Confirm Your CLI-Created Branch on GitHub
Return to the repository page on GitHub:
feature/add-login
branch should appear in the list.Congratulations – you’ve created a new branch on GitHub using both the web interface and the command line!
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.