This skill helps you in creating a new branch in a GitHub repository. Once you have completed these steps, the branch will be available in your GitHub repository. You can start working on the new branch. Pre-Requisites: Ensure that you had a valid GitHub account and at least one repository. NOTE: Please sign in to your GitHub account and then execute this skill.
-
1.
Open GitHub on the web.
-
2.
On the GitHub, homepage click on your "profile picture" located at the top right corner, and a drop-down will appear.
-
3.
To navigate to the repository select "Your Repositories" from the drop-down list and you will be directed to the repositories page where all the repositories will be listed. Select the repository in which you want to create a branch by clicking on the repository name.
-
4.
Once you're inside the repository, click on the "branches" tab located towards the left side of the page, next to the text tags. This will display the existing branches in the repository.
-
5.
On the right-hand side, above the list of branches, you will find a button named "New branch". Click on it to start creating a new branch.
-
6.
In the "New branch" dialog box, enter a name for your new branch. Choose a descriptive name that reflects the purpose or feature you're working on. Then click on the "Next" button in the Supervity instruction widget. For example, if you're working on a feature called "user-authentication," you can name the branch "user-authentication" or something similar.
-
7.
Select the branch that you want your new branch to be based on. By default, the new branch will be based on the repository's default branch (e.g., "main" or "master"). Then click on the "Next" button in the Supervity instruction widget.
-
8.
After providing the branch name and selecting the base branch, click on the "Create branch" button. This will create a new branch in the repository. You can start working on the new branch, making commits, pushing changes, and eventually, opening pull requests to propose merging your changes back into the main branch or another target branch.