Creating a Branch
Create a branch in the GitHub web UI that's subordinate to the main branch.
Prerequisites
- You have a GitHub account and are logged in.
- You have access to the repository where you want to create the branch.
Steps
- In your GitHub repository, make sure you’re on the Code tab.
- Check that the branch menu under the repository title shows the
mainbranch. If you’re not onmain, select it from the branch menu. - Click the branch menu to open the Switch branches/tags dropdown menu.
- In the entry field with the search icon, enter a name for your new child branch.
- In the Branches tab of the dropdown, click Create branch
<branch-name>from main.
Result
- You’re automatically switched to the branch you've just created.
- Both the
mainbranch and your new branch are now displayed in the repository.