Classroom guide

A step-by-step guide on setting up your GitHub Organization for classroom use.

Deprecation Notice:

GitHub Classroom automates the manual processes described in this guide and is the recommended way to teach with GitHub.

We're here to help. If you get stuck or have any questions about using GitHub in the classroom, please ask a question in the repository or send us a note.

Have ideas about how this guide could be better? Send us a pull request.

Creative Commons License

To have students complete assignments using forks (note: this setup means that students will be able to see one another's work):

1. Create the repositories

Create one repository per assignment. Include any boilerplate files your students will need to get started.

If you'd prefer that your assignments or students' work isn't publicly visible, request private repositories to use for your class. You will need one private repository per assignment.

2. Give students read-only access

If your repositories are public, you can skip this step.

If your course materials are in private repositories, students will need read-only access to them. Create a students team with "read access" and give that team access to all repositories that they will need. Next, add each student to the team, via add_to_team in our teachers_pet tool, or manually.

Read more about access control.

3. Completing assignments

Your students then follow these steps for each assignment:

  1. To start, fork the repository.
  2. Clone the repository to your computer.
  3. Modify the files and commit changes to complete your solution.
  4. Push/sync the changes up to GitHub.
  5. Create a pull request on the original repository to turn in the assignment.

You may consider making a context-specific copy of these steps in your syllabus or assignment description – grab the markdown.

4. Reviewing assignments

Once created, you can then do code review with line-by-line feedback directly within the pull request. If you allow your students to submit corrections, they can push fixes up to their forks, which will be reflected in the pull request.

Since you don't want any solutions in the original assignment repository, you should leave the pull request unmerged. When you're finished giving feedback, you can close the pull request and leave a :+1: (:+1:) in a final comment.