GitHub Practice: Instructions

GitHub Practice

Before you start practicing, make sure you have:

Forked respository

  1. Find a repository on GitHub you could envision yourself contributing back to, or tweaking for another use
  2. Fork this repository
  3. Post the repository name & URL to the class 3 forum in Moodle
  4. Clone the repository to your local machine
  5. Make a change to the repository and push back to GitHub

Moving a local repository to GitHub

  1. Start a git repository from scratch (create a new directory, or start tracking an existing one that has not previously been a git project. Don't use the forked project above!)
  2. Create an empty GitHub repository
  3. On local, set up a remote on your new/new-to-git repository
  4. Push to GitHub

How to Delete a repository on GitHub

Since these repositories were just exercises, you might not want them cluttering up your GitHub account. To get these practices out of your GitHub account, go to the GitHub page for your repository - there will be tabs just under the repository name. The first will be "Code"; the last, "Settings". Click on "Settings", then scroll to the bottom of that page. You will see a "Danger Zone" box with the option to delete the repository there.

Advanced: Pull Requests

Try out an fork, clone, and pull request exercise we had ready for a class that was never used. See this page for more information. Make sure you also set up a way to track changes on the remote branch!