Git: Assignment Submission and Workflow

Cloning, Pull Requests, Forking, Pulling, and Pushing

See the Happy Git and GitHub for the useR chapter Fork a repo.

Instructions

  1. Go to the course website, click Assignments.

  2. Scroll down to the Assignments section, click on the link to the assignment under Instructions and Submissions.

  3. Click on the Fork button to fork the repository to your GitHub account.

  4. Click Clone or download. You will work on the copy of the repository that exists on your account.

  5. Click Copy to clipboard

  6. Go to RStudio, click File and select New Project.

  7. Select Version Control.

  8. Choose Git.

  9. Paste the URL that you copied into the field Repository URL, choose a name for the folder in which the project will be saved in the field Project Directory Name, and select the sub-directory

Overview

Relationship between git and GitHub

The above diagram provides an overview of the relationship between these repositories and the workflow.

  1. Forks the repository UW-POLS501/assignment-1 to username/assignment-1 to get a copy of the assignment in their GitHub account.
  2. Clone the repository to their device.
  3. Work on the assignment and commit changes to the repository on their device.
  4. Push changes to their repository, UW-POLS501/assignment-1
  5. When ready to submit their assignment, open a Pull request

Alternatively, the workflow is represented as: