Skip to content

Git Commands

Here’s exactly what to type in your terminal at each step of the workflow. You can refer back to this page any time.


Always do this before starting any new work:

Terminal window
git checkout main
git pull

This switches you to the main branch and downloads any new changes.


Replace your-name/feature-name with something descriptive:

Terminal window
git checkout -b your-name/feature-name

Examples:

  • git checkout -b alex/add-walk-sound
  • git checkout -b sam/fix-wall-collision
  • git checkout -b jordan/npc-interact-revamp

Work normally; write code, add files, whatever you’re working on. Git is watching, but won’t do anything until you tell it to.

You can check what you’ve changed at any time:

Terminal window
git status

When you’re ready to save a checkpoint:

Terminal window
git add .
git commit -m "Short description of what you changed"

git add . stages all your changed files. git commit saves the snapshot.


Upload your branch so it exists online:

Terminal window
git push origin your-name/feature-name

Use the same branch name you created in Step 2.


  1. Go to the repository on github.com
  2. You’ll see a yellow banner: “your-branch had recent pushes”. Click Compare & pull request
  3. Write a clear title and description
  4. Click Create pull request

That’s it! A club president will review it and either approve it or leave feedback.


Make the changes on your branch, then:

Terminal window
git add .
git commit -m "Address review feedback"
git push origin your-name/feature-name

The PR updates automatically, no need to open a new one.