- Create a new branch in the project repository.
- Clone the remote repository to our local system.
- Switch from the main branch to the new branch
- Create a new project.
- Push the code from visual studio code to GitHub.
- Open a pull request.
- Merge the Pull request.
- Delete subbranch from remote repository.
This article includes first 2 steps. Rest will be included in the next parts.
Create a New Branch
Branching lets you have different versions of a repository at one time. By default, your
repository has one branch named main/master. You can create additional branches in your
repository. This is helpful when you want to add new features to a project without changing the
main source of code. The work done on different branches will not show up on the main branch
until you merge it. If someone made changes to the main branch while you were working on
your branch, you could pull in those updates.
To create a new branch, do the following steps:
- Go to the repository: Open the GitHub website and navigate to the repository
where you want to create the new branch.

2. Click on the branch dropdown: In the top left corner of the repository page, you
should see a dropdown with the name of the current branch. Click on it to open
the dropdown menu.

3. Type the name of the new branch: In the dropdown menu, type the name of the
new branch you want to create in the “Find or create a branch” field. This can be
any name you choose, but it’s good practice to use a descriptive name that
reflects the purpose of the branch.
4. Click on “Create branch”: Once you’ve typed in the name of the new branch,
click on the “Create branch” button to create the new branch.
For example, here we are creating a new branch “OTP-4001-basic-search”.

5. Verify the new branch: After the new branch is created, you should see a
notification at the top of the page that confirms the new branch has been
created. You can also verify that the new branch was created by looking at the
dropdown in the top left corner of the repository page. It should now show the
name of the new branch as the current branch.

Now that you’ve created the new branch, you can start making changes to the code in that
branch without affecting the code in the main branch or any other existing branches.
Clone Repository to Local System
- Open your terminal or command prompt on your local system.
- Navigate to the directory where you want to clone the repository.

3. Copy the URL of the repository from the Code section in the GitHub.

4. Type the command git clone followed by the URL of the repository.

5. Press Enter key.
When cloning a remote repository from GitHub to a local system, GitHub may prompt
a sign-in pop-up.

If you see a sign-in pop-up when cloning a remote repository from GitHub to your
local system, you should enter your GitHub username and password to authenticate
your account. If you have enabled two-factor authentication (2FA) on your GitHub
account, you will also need to provide a 2FA authentication code. Once you have
entered the required information and authenticated your account, GitHub will allow
you to access the repository and complete the cloning process.

Git will download a copy of the repository to your local system.


The remaining steps will be covered in the upcoming articles.