Create a new branch in github

Here are the steps to create a new branch in GitHub:

Using the GitHub Web Interface:

  1. Log in to your GitHub account and navigate to your repository.
  2. Click on the "Code" button on the top left corner of the repository page.
  3. Click on the "New branch" button.
  4. Enter a name for your new branch in the "Branch name" field. You can also choose a base branch from the dropdown menu.
  5. Click on the "Create branch" button.

Using the Command Line:

  1. Open your terminal and navigate to your local repository directory.
  2. Use the following command to create a new branch: git branch <branch-name>
  3. Replace <branch-name> with the name you want to give your new branch.
  4. To switch to the new branch, use the following command: git checkout <branch-name>
  5. To push the new branch to your remote repository, use the following command: git push origin <branch-name>

Example:

Let's say you want to create a new branch called "feature/new-login-system". Here are the steps:

Using the GitHub Web Interface:

  1. Log in to your GitHub account and navigate to your repository.
  2. Click on the "Code" button on the top left corner of the repository page.
  3. Click on the "New branch" button.
  4. Enter "feature/new-login-system" in the "Branch name" field.
  5. Click on the "Create branch" button.

Using the Command Line:

  1. Open your terminal and navigate to your local repository directory.
  2. Run the command: git branch feature/new-login-system
  3. Run the command: git checkout feature/new-login-system
  4. Run the command: git push origin feature/new-login-system

That's it! Your new branch should now be created and available in your repository.