Git: Contribute To A Repo Exercise

The goal of this exercise is to see the social side of Github. At the end of this exercise, you will contribute to our student directory repo.

Part 1: Get your copy of the repo

  1. On the student directory repo page, click on the "Fork" button in the upper right corner.
  2. In Github Desktop, under "File" → "Clone Repository", select "gdi-summer-2016-students" and click the "Clone gdi-summer-2016-students" button. (You might have to restart Github Desktop.)
  3. Navigate to an appropriate path for this repo, such as in the same folder as your portfolio's repo, and click the "Clone" button.

Part 2: Add your code!

Make your changes locally
  1. In your text editor, open index.html in the gdi-summer-2016-students repo.
  2. Add your code and save your changes. Include your to-be-online portfolio: http://[your username].github.io/[your repo].
  3. In Github Desktop, with the gdi-summer-2016-students repo selected in the left panel, click on "View" → "Uncommitted Changes". Notice that index.html is listed in the middle panel, and your changes are highlighted in green in the right panel.
  4. In the form at the bottom of Github Desktop's middle panel, fill out the "Summary" and "Description" fields and click on the "Commit to gh-pages" button.
Push your changes to your repo on Github
  1. In Github Desktop, click on the "Sync" button in the top right corner. That's it!
  2. Go to https://github.com/[your username]/gh-pages and see your commit!
Merge your changes into the original directory repo
  1. In Github Desktop, click on the "Pull Request" button in the top right corner.
  2. Fill out the form with an appropriate title and description, and ensure that your branch is going into mjawili/gdi-summer-2016-students, and click the "Send Pull Request" button.

That's it! Now just wait for your pull request to be merged. If it doesn't get merged, you'll receive some feedback why, and you can make any extra corrects and try again.