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.
- Set up a GitHub repository:
- Open GitHub and log in if you need to.
- Click on the + at the top right of the page, then New Repository.
- Give the repository a name and check Initialize this repository with a README.
- Under the repository's Settings, scroll down to GitHub Pages select master under Source.
- Keep the repository open in one of your browser tabs.
- Export your Glitch project:
- Open any Glitch site in your account. If you don't have one handy, remix this one.
- Click Tools in the bottom left of the page.
- Click Git, Import, and Export.
- Click Export to GitHub. You may have to click grant access first.
- 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.
- Merge the changes in your GitHub repository:
- Go back to GitHub and open the repository that you created earlier. Click Branch: master and select Glitch.
- On the next page, click New pull request.
- On the next page, click Create pull request.
- On the next page, click Merge pull request.
- Confirm that your page is published on GitHub Pages: look for the URL in the repository's settings under GitHub Pages.
- Share your repository and GitHub Pages URLs in the Google Doc.
- 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:
- Pick a platform:
- 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.
- Share a URL or screenshot of your work in the Google Doc.