Github Classroom
We’ll be using Github Classroom to share all resources for class. This is the primary way you should be downloading and working with course materials. Each week, we’ll create a new Github Classroom assignment link (prefixed with 📚). Clicking it will automatically create a github repository for you containing all the materials you need.
You’ll then be able to clone this repository to your computer, working through files interactively, make edits/updates, and commit and submit your assignment for review. Each time you push your work to Github, your instructors will be able to provide review, feedback, and discussions that directly reference your code.
You’ll always be able to access your assignment repositories, history, and instructor feedback after the course is over. So the more effort you put into assignments, the more you engage with instructors, the more you’ll learn, and the higher quality resources you’ll have for your own future reference!
Getting Assignments
- Open any course link that starts with 📚
- Accept the assignment in your browser
- Click the URL to go the auto-created github repo (this will always be named
assignment-name-YOUR-GITHUB-USERNAME) - Clone it to your local computer using
git clone - Open and work on any notebook files using VSCode
- Commit your changes locally using
git add&git commit - Push your changes to github using
git push - Respond to any feedback discussions under the “Pull Requests” tab on the github repo
Updating Assignments
Occasionally, we’ll update assignments that you’ve already accepted and git clone-d to your local computer with additional files (e.g. solutions). Here’s how you can git pull them to your local computer
- Follow the assignment link to go to the repository on github.com that you cloned to first start the assignment. It will be named MM-DD-YOURGITHUBID, e.g. “01-21-ejolly”
- Click on “Pull Requests”
- Click on “Github Classroom: Sync Assignment”
- Click on green “Merge pull request” button
- After the button turns purple, indicating the “merge is complete” open up a terminal on your local computer and
cdinto the folder you cloned from this repository, e.g. “01-21-ejolly” - Use
git statusto check if you’ve saved some changes, but haven’t yetgit committhem. If you don’t see “nothing to commit, working tree clean”, you’ll need togit addandgit commityour changed files - Run
git pullto download the latest changes from github - If you get any wonky error message, run
git merge --no-ff, and then type the following commands to exit the window that opens::,w,q,enter
If everything worked you should see some new files in your local folder, and you can hack on them as you normally would.