Basic Git commands [part 2]


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:


That’s all,


One thought on “Basic Git commands [part 2]

  1. Pingback: Basic Git commands [part 3] | blog_do_airton += coisa_nova;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s