Get Started with Git

August 17, 2015

Let's start at the very beginning:

Create a GitHub Account

Download a GitHub Client:

Git for Mac

Git for Windows

Git for Linux

Login to your GitHub Client with your GitHub Account. Remember, if using your personal gmail account, github will use your gmail avatar for your account.

Creating your first repo

In your GitHub client, try creating a repository by clicking on the grey + in the upper left-hand corner. A dialog box will open, asking you (1) what to name your new repository, and (2) where to put the repo folder. It defaults to your desktop, but you can choose to put the folder in a department server, or other place that is easy for you to access.

Making changes

You can store almost any file type in your repo (.xml, .html. png, .jpg, .js, .md, and many, many more!) To add a file, just drag and drop it into the repo folder. When you make changes to the files within the repo, the client will show how many files have been changed. Always remmber to save these changes by making a "commit". The client makes this process very simple. Every commit needs a good description of what changes have been made to a document or group of documents. In the subject line, write a short description of what has been changed, keep it under 50 characters. If more detail is needed, it can be noted in the description box.

Here are a few good guidelines for writing commit messages:

-Commit messages should always be in the present tense
-Capitalize your subject line
-Don't end your subject line with a period
-Bullet points are OK
-Write your commit messages as if they are commands (ie. "Change title of chapter 1", "Reformat Introduction", "Fix spelling errors in Chapter 7")

A properly formatted commit message should always be able to complete the following sentence:

If applied, this commit will your subject here

If applied, this commit will    Add chapters 1-7 to table of contents
If applied, this commit will    Change header fonts
If applied, this commit will    Reformat colophon

After writing your commit messages, click the Commit to master button below the message. This saves your changes locally

If you're sure you want to save these changes to the repository, click on the Sync button in the upper right hand corner.

Then, congratulations! You're on your way to becoming a GitHub pro!