This is one of the simplest tutorial on how to use the basic commands of Git. We’re gonna create a new branch. Let’s say our new branch name is “code-dev”.
Create new branch on local machine:
$ git checkout -b code-dev
Send new branch to remote repository
$ git push origin code-dev
Now, you can probably see the branch code-dev created on GitHub (if you are using it) or Bitbucket (if you are using it) by browsing the remote repository from a Web browser.
You can also check all the existing branches, locally.
$ git branch
You should see something like this: