Git Basics

Installing Git

 * Windows
 * OS X
 * Linux

To fork a project on Github

 * Start out logged in to Github


 * Visit the project you want to fork


 * Click the "Fork" button in the top-right


 * Wait for the animation to conclude


 * Notice that your browser is now visiting a copy of the project in your personal space, rather than the old, group-owned one. You should also see a "forked from..." remark in the top-left.

Now, clone to it to your computer

 * On the right side, look for the clone URL


 * Copy that to the clipboard


 * Open a terminal and type: "git clone " (including the space, but not including the quotation marks)


 * Use your terminal to "paste" the URL in. (Make sure it starts with https; if not, it is likely to cause problems unless you have SSH keys set up.)


 * Press enter to do the "git clone" operation.


 * Once you've done that, "cd" into the directory.

Make changes

 * Make changes to the repository using whatever tools you usually use and whatever the project specifies. You can access files in a git repository the same way you'd access any other files on your computer.

Commit and push
Once you're finished making changes, you can use the following command to get a list of files you've changed:

git status

You can commit your changes by typing "git add" followed by the files you've changed, for instance:

git add index.html

Once you've added the changes, you can "commit" them with a message specifying what you've changed.

git commit -m "Explanation of my changes"

Now, publish those changes on Github by typing:

git push

You will be prompted for your username and password. (If you find constantly entering your username and password annoying, there's an alternate method we can show you called SSH.)

(Alternatively, you may be prompted to set your name and email address. This means you missed a step in setting up git.  No worries, you can set them now.)

You can now visit Github and make sure your personal fork contains those changes.

Create pull request
Visit your personal fork and click the "Pull requests" button on the right. This will offer you the chance to make a new pull request by clicking on "New pull request". Explain what you did, and leave a remark that this relates to any issue tracker issues or pages that prompted you to contribute.

Now, get feedback from the project's maintainer and eagerly await your pull request getting merged!