Get started with Git

0 Flares 0 Flares ×

Developers know and love Git as a distributed version control and source code management (SCM) system known for its speed. If you want the full resources on Git, start here.

Below is a quick tutorial from Skillcrush.com. View the full tutorial here.

Step 1: Install Git

Git has a fantastic guide all about how to get up and running with Git. In order to install Git you are going to need to use your command line (or terminal) tool. Before you dive into Git, review the key command line commands.

The key to using the command line is that you are going to be speaking to your computer directly with some very specific language. The good news is that when you write the wrong thing your command line will tell you and the other good news is that the Git install guide tells you exactly what to write.

Go get ‘em: Getting Started Installing Git

Step 2: Learn the top Git commands you gotta know

Using Git is actually quite easy, as long as you type the right thing. You are quickly going to find that there are really only ten or so commands that you are going to find yourself using 90% of the time. And here they are!

Once you have created the directory (folder) for your code and you are inside of that directory in the command line, try typing the follow commands:

git init
This command will create a git repository so you can get started!

git add .
This command is used to stage all of your changes, which means that you alert Git to the fact that you have made changes.

git commit -m “Your commit message”
This command tells Git that you have made changes and in between the quotes is where you tell Git what you did.

git push
When you are ready to share your changes with others, git push pushes the changes to a remote branch such as Github or a cloud hosting service for deployment.

git status
This command will provide you with information on the current state. You can see what files have been added, which are untracked, which are staged and which branch you are working on.

git diff
Before you stage and commit, this command will show you what you’ve changed in the repository. It is very useful for a sanity check before you commit your changes.

0 Flares Twitter 0 Facebook 0 LinkedIn 0 0 Flares ×
Show Comments
0 Flares Twitter 0 Facebook 0 LinkedIn 0 0 Flares ×