Git tutorial from Code School

Code School offers free Git tutorial – 15 minutes. Tutorial covers adding source code to the repository and push the master to origin (remote). Also, it covers how to create a branch and merge back to the trunk. In a short time, learned important commands. Very useful!

Here are commands that I learned from this tutorial.


Several important concepts.

  • master :   local repository
  • origin : remote repository
  • push -u origin master : push master code to origin and -u remember origin and master, so later I can skip origin master. Just push
  • checkout — file_name : Revert back the source code to when file_name file was committed.
  • branch branch_name : Create a branch with branch_name
  • checkout branch_name : Check out branch_name branch
  • branch -d branch_name : Delete a branch branch_name



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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s