Class 19
More Git and GitHub, Web Publishing
Preparation Reading
Agenda
Today we’ll focus on:
- R projects with git and GitHub
- Sharing a Quarto-based website on GitHub
Why are we talking about web publishing? You may want to share your analyses with other people! This is a nice way to do so. You can also use these tools to make a personal webpage linking to a portfolio of projects or other project-specific websites.

Notes on formats (and assignments)
Remember to set your options to not save unnecessary history, etc., to avoid sharing/copying lots of extra files in your .Rproj folder (these may be hidden if you are not displaying hidden files, but they will zip/copy/commit/push!).
Also make sure not to copy those files all into one folder, so that your project folders don’t end up looking like this when you want to share:

If you need to share an html report with someone, you need to either share the whole folder (awkward) or use embedded resources, so that the images and style information are included inside the file. Otherwise your beautiful report will end up looking like this:

Creating a Repo for an Existing R Project
We’ll review the steps for today’s preparation assignment.
Creating a Repo First
You can also create a repository first and then put an R project in it.
Working with your Repository
We’ll practice the following workflow steps using GitHub Desktop:
- Committing changes
- Pushing changes
- Pulling changes
Then we’ll look at our projects on GitHub and checkout the following:
- repository visibility (private/public)
- adding collaborators (sharing private projects - add my account
lisalevinson) - GitHub pages
Creating a Quarto-based Website
There are various ways to share Quarto documents on the web, but we’ll cover two approaches.