Creeating a new branch on git
To create a new branch on Git, you can use the following command:
git branch <branch-name>
Replace <branch-name>
with the name you want to give your new branch.
For example, if you want to create a branch called "feature/new-login-system", you would run:
git branch feature/new-login-system
This will create a new branch with the specified name, but it won't switch you to that branch. To switch to the new branch, you can use:
git checkout <branch-name>
So, in this case:
git checkout feature/new-login-system
This will switch you to the new branch, and you can start making changes and committing them to that branch.
If you want to create a new branch and immediately switch to it, you can use:
git checkout -b <branch-name>
This will create a new branch and switch you to it in one step. For example:
git checkout -b feature/new-login-system
This will create a new branch called "feature/new-login-system" and switch you to it.
Note: If you're working on a remote repository, you'll need to push your new branch to the remote repository using git push origin <branch-name>
after creating it.