Command to create new branch in git
To create a new branch in Git, you can use the following command:
git branch <branch-name>
Replace <branch-name>
with the name you want to give to your new branch.
For example, to create a new branch called "feature/new-login-system", you would use the following command:
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. If you want to switch to the new branch immediately, you can use the following command:
git checkout -b <branch-name>
This will create a new branch with the specified name and switch you to that branch.
For example, to create a new branch called "feature/new-login-system" and switch to it, you would use the following command:
git checkout -b feature/new-login-system
Note: If you want to create a new branch based on the current branch, you can use the following command:
git branch <branch-name>
This will create a new branch with the same name as the current branch, but with a different name. For example, if you're currently on the "master" branch, you can create a new branch called "feature/new-login-system" like this:
git branch feature/new-login-system
This will create a new branch called "feature/new-login-system" based on the "master" branch.