

This is most commonly used because it will create the branch for you from your current branch and it will switch you to that branch in a single command. With Git 2.
We can do -set-upstream or we can do -u, and then origin jsChanges. The most common way to create a new branch is the following: git checkout -bWe have to push while setting the upstream to the origin jsChanges, just like this is origin master. When we do, we get a fatal error, because if we do git branch -vv, we don't have jsChanges linked to any remote branch. If we do a git log oneline, then we have "Adds Hello World" on the jsChanges branch, which has diverged from the master branch. We'll commit that and we'll say, "Adds Hello World." Then, let's save that and do a git status. We'll make a function called helloWorld again, and we can say alert i. Master is linked to a remote, but jsChanges is just a local branch for now.
If we do git branch -vv, for verbose mode, then we can see the current commit that we're on for each branch, and we can see the remote that we're on for each branch. in the Web UI under Projects > List >We can also do git branch to see all of our branches.

If we do a git status, we can see that we're on the branch jsChanges.
git checkout -bNote that after command completion, Git has moved HEAD to the new branch. The switch -b specifies the name of the branch. If you want to create a branch and checkout the branch simultaneously, use the git checkout command. In the Based on section, use the drop-down list to choose whether you want to base your new branch off an existing local branch or a remote branch. To create a new Git branch in GitKraken, you will simply right-click on any branch or commit and select Create branch here. Option 2: Creating a Branch using Checkout. Tip For branch naming details, see Special characters in branch and tag names. That's what we'll do to make a new branch. In the Create a new branch dialog box, enter a branch name.

We can do git branch and then our branch name like jsChanges or we can do git checkout -b jsChanges. First, move to your project directory (your local branch) and create a new branch. Instructor: We can create a new branch in two different ways.
