Advanced GIS

In-class Exercise: GitHub

Part 1: Put a site on GitHub Pages

In this exercise, we'll put a Glitch site online with GitHub Pages. This process is long but we outline the steps here and you can refer to tonight's slides for images showing the process.

  1. Set up a GitHub repository:
    1. Open GitHub and log in if you need to.
    2. Click on the + at the top right of the page, then New Repository.
    3. Give the repository a name and check Initialize this repository with a README.
    4. Under the repository's Settings, scroll down to GitHub Pages select master under Source.
    5. Keep the repository open in one of your browser tabs.
  2. Export your Glitch project:
    1. Open any Glitch site in your account. If you don't have one handy, remix this one.
    2. Click Tools in the bottom left of the page.
    3. Click Git, Import, and Export.
    4. Click Export to GitHub. You may have to click grant access first.
    5. In the dialog that opens, type your GitHub username, a / and the GitHub repository name from earlier. For example, my GitHub username is ebrelsford. If my repository is map-class11, I would type ebrelsford/map-class11.
  3. Merge the changes in your GitHub repository:
    1. Go back to GitHub and open the repository that you created earlier. Click Branch: master and select Glitch.
    2. On the next page, click New pull request.
    3. On the next page, click Create pull request.
    4. On the next page, click Merge pull request.
  4. Confirm that your page is published on GitHub Pages: look for the URL in the repository's settings under GitHub Pages.
  5. Share your repository and GitHub Pages URLs in the Google Doc.
  6. If you have time, make a change to your Glitch site and go through the steps above (starting at Export your Glitch project). Ensure your changes appear on GitHub Pages—it may take a few minutes for this to happen.

Part 2: Put a site on GitHub Pages

Try out one of the other mapping platforms we talked about in class:

  1. Pick a platform:
  2. Experiment with the platform—upload some data, try styling the data, and save it. If you need some data to work with, consider today's data.
  3. Share a URL or screenshot of your work in the Google Doc.