Github Classroom¶
Github¶
Each student should create Github account if you don't already have one. Be sure to include your Harvard email as one of the emails associated with the account, as this will give us access to additional features such as GitHub Copilot
One option to avoid inputting your username and password when pushing to a private repository is to use SSH keys. If you've previously set up SSH keys for Github, you can reuse them by copying your existing key pair to the ~/.ssh
directory. Otherwise, you'll need to generate new SSH keys by following these steps:
- Launch your terminal
- Run
ssh-keygen -t rsa
and follow the instructions - You have now created your ssh keys in the directory
~/.ssh
- Run
cat .ssh/id_rsa.pub
to display your public key - Copy your public key and enter it into Github under Settings > SSH Keys
Getting Started with Github Classroom¶
When the class begins, the TA will send out a form asking for your GitHub username. Be sure to promptly fill this out.
Setting Up Your Repository¶
When a GitHub classroom assignment is created, a template repository will be cloned into your personal GitHub account. Note that each team should create only one repository for each homework. You should discuss with your team members to decide who will host the repository and how to collaborate with each other.
Follow these steps to get started:
- Look for an email with the Github Classroom assignment invitation
- Open the link and select "Accept this assignment"
- Wait for your repository to be created - you'll see a confirmation page
- Find the repository URL by clicking the green "Code" button
- In your terminal:
Submitting Assignments¶
When starting and submitting assignments:
-
Tag the start:
-
When ready to submit:
Make sure to commit all changes before tagging and pushing.