Term Project: GitHub Setup
You will keep your term project in a private GitHub repository that the course staff creates for you. You use one repository for the whole project. At TP1, TP2, and TP3 you submit your code by tagging a commit in this repository (step 6). Your written proposals are submitted separately, on Gradescope.
1. Create a GitHub account
If you don’t have one, create a free GitHub account. If you already have one, you can use it. Choose a username you are comfortable sharing with the course staff.
2. Submit your GitHub username
Submit your GitHub username using this Google Form. Double-check the spelling: the course staff uses it to give you access to your repository.
3. Accept the repository invitation
The course staff creates a repository for you and invites you to it. GitHub emails the invitation to the email address on your GitHub account. Open it, click View invitation, and click Accept invitation. You can also find the invitation at github.com/notifications while signed in.
Invitations expire after 7 days. If yours expires, or you never receive one, contact the course staff.
Once you accept, the repository appears on your GitHub dashboard. Use this repository for all your term project work. Don’t create your own repository or fork this one; the course staff grades only the repository they created for you.
4. Clone the repository in VS Code
- On your repository’s GitHub page, click the green Code button and copy the HTTPS URL.
- In VS Code, open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on a Mac) and run Git: Clone.
- Paste the URL, choose a folder on your computer, and click Open when VS Code asks whether to open the cloned repository.
If VS Code asks you to sign in to GitHub, allow it. If VS Code says Git is not installed, install Git and restart VS Code.
Keep all your term project files inside this folder. Your repository should contain:
- your Python source files,
- every asset needed to run the project (images, sounds, data files),
- a
README.mddescribing the project, exact startup steps, needed assets or libraries, and useful controls.
Don’t commit __pycache__ folders or large files the project doesn’t need.
Your demo video link goes in your TP3 proposal, not in the repository.
5. Commit and push your work
Saving a file only changes your computer. To record a version and send it to GitHub:
- Open the Source Control view in the left sidebar.
- Type a short message describing the change, such as
Add gem swapping and match detection. - Click Commit. If VS Code asks whether to stage all changes, click Yes.
- Click Sync Changes to push your commits to GitHub.
Check your repository’s page on GitHub to confirm your latest files are there.
If your first commit fails with a message asking you to configure your
user.name and user.email, open VS Code’s terminal (Terminal > New
Terminal), run these two commands with your own name and email, and commit
again:
git config --global user.name "Your Name"
git config --global user.email "you@andrew.cmu.edu"
Commit whenever you finish a meaningful piece of work. Your commit history is your backup and shows how your project developed. Commits are not graded by quota.
6. Submit a milestone with a tag
Pushing saves your work on GitHub, but it does not submit it. To submit TP1,
TP2, or TP3, you mark the commit you want graded with a tag named after the
milestone: TP1, TP2, or TP3. Use capital letters exactly as shown; tags
are case-sensitive, and any other name is not a submission. (TP0 has no tag;
you submit only your proposal, on Gradescope.)
Before the deadline (see the Term Project Guidelines):
- Commit and push your final work for the milestone (step 5). Check GitHub to confirm it arrived.
- In VS Code, open the Command Palette and run Git: Create Tag. Enter the
tag name, such as
TP1, and press Enter. When asked for a message, press Enter to skip it. - Open the Command Palette again and run Git: Push Tags.
Or, in VS Code’s terminal (Terminal > New Terminal), from your repository folder:
git tag TP1
git push origin TP1
To confirm, open your repository on GitHub, click the branch menu (it usually says main), and select the Tags tab. Your tag should be listed.
Fixing a submission before the deadline. If you tagged too early and have pushed more work since, move the tag to your latest commit from the terminal:
git tag -f TP1
git push -f origin TP1
The course staff grades the commit that each tag points to. A tag pushed after the deadline is late.
7. Resources
- Using Git source control in VS Code
- GitHub basics
- Markdown, for your README: Basic writing and formatting syntax