A step-by-step guide for students using VS Code or Google Antigravity with the GitHub extension.
| Term | What it means |
|---|---|
| Git | Software installed on your computer that tracks every change you make to your files — like an unlimited "undo" for your entire project. |
| GitHub | A website that stores your Git-tracked project online so your whole team can share, sync, and collaborate. |
| Repository (repo) | A project folder that Git is tracking. Think of it as a special project folder that remembers its own history. |
| Commit | A saved snapshot of your changes, with a short message describing what you did. |
| Push | Uploading your local commits to GitHub so teammates can see them. |
| Pull | Downloading the latest changes from GitHub to your computer. |
| Branch | A parallel copy of the project where you can work without affecting the main version. |
| Pull Request (PR) | A request to merge your branch's changes into the main branch, usually reviewed by a teammate first. |
- Go to https://github.com
- Click Sign up
- Enter your email, create a password, and choose a username
- Verify your email address
- Keep your username professional — it goes on your resume
Choose one of the two options below. Both work identically for the rest of this guide — the steps are the same unless noted otherwise.
- Download VS Code from https://code.visualstudio.com and install it
- Open VS Code
- Click the Extensions icon in the left sidebar (it looks like four squares)
- Search for GitHub Pull Requests
- Click Install on the extension published by GitHub
- Restart VS Code when prompted
VS Code already has Git support built in — you do not need a separate Git extension.
- Download Antigravity from https://antigravity.google and install it
- Open Antigravity
- Click the Extensions icon in the left sidebar
- Search for GitHub Pull Requests
- Click Install on the extension published by GitHub
- Restart Antigravity when prompted
Antigravity is built on VS Code, so all menus, panels, and keyboard shortcuts in this guide work the same way.
The IDE uses Git behind the scenes, so Git must be installed on your machine.
- Go to https://git-scm.com/downloads
- Download and run the installer for your operating system
- Accept all the default settings during installation
- To confirm Git installed correctly:
- In your IDE, open the Terminal: View → Terminal (or press
Ctrl+`) - Type
git --versionand press Enter - You should see something like
git version 2.x.x— if so, you are good to go
- In your IDE, open the Terminal: View → Terminal (or press
- Click the Accounts icon (bottom left corner of VS Code. top right corner of Antigravity).
- Click Sign in with GitHub
- Your browser will open and ask you to authorize the IDE
- Click Authorize and follow the prompts
- Return to your IDE — you should now see your GitHub username in the bottom bar
"Cloning" means downloading a copy of a GitHub repository to your computer.
- Go to the class repository on GitHub and click the green Code button
- Make sure HTTPS is selected, then click the copy icon to copy the URL
- In your IDE, open the Terminal: View → Terminal (or press
Ctrl+`) - Navigate to the folder where you want to save the project. For example, to save it on your Desktop:
cd Desktop - Run the clone command, replacing the URL with the one you copied:
git clone https://github.com/username/repo-name.git - Move into the newly created project folder:
cd repo-name - Open the folder in your IDE:
code .
You will now see the project files in the left sidebar.
- In the left sidebar, click on any file to open it
- Make a small edit — for example, add your name to a line in the file
- Save the file: File → Save or
Ctrl+S
You will notice the file name in the sidebar turns yellow/orange with an M beside it. That M stands for "Modified" — Git has noticed your change.
Committing saves a permanent snapshot of your changes in your local Git history.
- Click the Source Control icon in the left sidebar (looks like a branch/fork)
- You will see your modified file listed under Changes
- Hover over the file and click the + button to stage it — this tells Git "include this file in my next commit"
- The file moves up to Staged Changes
- Click into the text box at the top that says Message and type a short description of what you changed — for example:
Add my name to the contributors list - Click the Commit button (the checkmark ✓) or press
Ctrl+Enter
Your change is now saved as a commit in your local history.
Pushing sends your local commits up to GitHub so your teammates can see them.
- In the Source Control panel, click the three-dot menu (...) at the top right
- Click Push
- If prompted to sign in or authorize, follow the on-screen steps
- Go to your repository on GitHub.com and refresh the page — you should see your change
Shortcut: The blue Sync Changes button at the bottom status bar does a Pull + Push in one click. This is the easiest option for most situations.
Before you start working each session, always download the latest version from GitHub first.
- In the Source Control panel, click the three-dot menu (...)
- Click Pull
- Your local files will update with any changes your teammates pushed
If you skip this step and a teammate has pushed changes, Git may warn you about conflicts. Get into the habit of pulling first thing every time.
Branches let each team member work independently without breaking the main project. Never commit directly to main or master on a team project.
- Click the branch name shown in the very bottom-left of your IDE window (it probably says
mainormaster) - Click Create new branch...
- Type a short descriptive name — for example:
feature/add-login-pageorfix/typo-in-readme - Press Enter — you are now on your new branch
Follow Steps 5–7 as normal. Your commits go onto your branch and do not affect main or master.
- Source Control panel → three-dot menu → Push
- If prompted to publish the branch, click OK
A Pull Request (PR) lets a teammate review your work before it is merged into main or master.
- Go to your repository on GitHub.com
- GitHub will show a yellow banner: "Your branch had recent pushes" — click Compare & pull request
- Write a clear title and description of what you changed and why
- On the right side, assign a Reviewer (a teammate)
- Click Create pull request
Your teammate will review the changes, leave comments if needed, and click Merge pull request when it is approved.
- Open the Pull Request on GitHub
- Read through the Files changed tab to review what was modified
- Leave comments on any lines that need clarification (click the + that appears when hovering over a line)
- If everything looks good, click Review changes → Approve → Submit review
- Click Merge pull request → Confirm merge
- Click Delete branch to keep the repository tidy
| Problem | What to do |
|---|---|
git --version shows an error |
Git is not installed — go back to Step 2 |
| Push is rejected ("non-fast-forward") | You forgot to Pull first — run a Pull, then Push again |
| File shows U (Untracked) in Source Control | The file is new and has never been committed — stage it with + |
| Merge conflict warning | Two people edited the same lines — open the file, look for <<<< HEAD markers, choose which version to keep, save, stage, and commit |
| "Author identity unknown" error in terminal | Run these two commands once: git config --global user.email "you@example.com" and git config --global user.name "Your Name" |
| Changes disappeared after switching branches | Your changes were not committed — always commit before switching branches |
| Action | How to do it in the IDE | Terminal shortcut |
|---|---|---|
| Clone a repo | Command Palette → Git: Clone |
git clone <url> |
| See what changed | Source Control panel | git status |
| Stage a file | Click + next to the file | git add filename |
| Commit | Type message + click checkmark | git commit -m "message" |
| Push | Source Control ··· → Push | git push |
| Pull | Source Control ··· → Pull | git pull |
| Create branch | Click branch name → New branch | git checkout -b branch-name |
| Switch branch | Click branch name → select branch | git checkout branch-name |
Remember: Git tracks history — you can almost always recover from mistakes. When in doubt, commit early and often, and always Pull before you start working.
Work through these exercises in order with your team of 3–4 people. Assign roles before you start.
| Role | Who does it |
|---|---|
| Team Lead | One person — responsible for setup and inviting teammates |
| Member B | Second person |
| Member C | Third person |
| Member D | Fourth person (if your team has 4) |
Who does this: Team Lead only
Your team needs its own copy of the class repo that everyone can push to. The cleanest way to do this is to fork it — forking creates a copy of the repo under your own GitHub account, making you the owner.
- Go to the class repository on GitHub (your instructor will share the URL)
- Click Fork (top-right corner of the page)
- Leave all settings as default and click Create fork
- You now have your own copy at
https://github.com/YOUR-USERNAME/repo-name - Clone your forked repo to your computer (follow Step 4 of the main guide, but use your fork's URL)
- On your forked repo page on GitHub, click Settings
- In the left menu click Collaborators
- Click Add people
- Search for each teammate's GitHub username and click Add [username] to this repository
- Set their permission level to Write (this gives full push access)
- Each teammate will receive an email invitation — they must accept it before they can push
- Check your email for an invitation from GitHub, or go to
https://github.com/notifications - Click Accept invitation
- Confirm with the Team Lead that all invitations are accepted before moving on
Who does this: All team members (including Team Lead)
Each person clones the Team Lead's forked repo and adds their name to a shared file.
Important: The Team Lead already cloned the repo in Exercise 1. Skip the clone step and start from step 3.
- Get the Team Lead's forked repo URL (ask them to share it, or find it on GitHub)
- Clone it to your computer:
git clone https://github.com/TEAM-LEAD-USERNAME/repo-name.git cd repo-name code .
- Create a new file named
team/YOUR-STUDENT-ID-NAME.md— for exampleteam/113403999-mike.md - Inside the file, write two lines:
# Hi, I'm Mike I am a student in IM2002 and this is my first GitHub commit. - Save the file, stage it, commit it with the message
Add intro for [your name], and push - Once all team members have pushed, everyone should run a Pull to get the full set of intro files
Check: Go to the repo on GitHub. You should see a team/ folder with one file per person.
Who does this: All team members simultaneously
This exercise practices the correct team workflow — each person works on their own branch so no one blocks anyone else.
- Pull the latest changes first:
git pull - Create your own branch. Use your name in the branch name:
git checkout -b feature/YOUR-NAME-update - Open your intro file from Exercise 2 (
team/YOUR-STUDENT-ID-NAME.md) - Add a third line describing one thing you want to learn in this course — for example:
I want to learn how to manage a database-backed project as a team. - Save, stage, commit, and push your branch:
git add team/YOUR-STUDENT-ID-NAME.md git commit -m "Update intro with learning goal" git push -u origin feature/YOUR-NAME-update - Go to the repo on GitHub and open a Pull Request from your branch into
mainormaster(follow Step 10 of the main guide) - In the Pull Request description, tag a specific teammate as reviewer using
@their-username
Check: The repo on GitHub should now have 3–4 open Pull Requests, one from each team member.
Who does this: All team members — each person reviews someone else's PR
- Go to the Pull Requests tab on the repo's GitHub page
- Open a PR that was opened by a teammate (not your own)
- Click the Files changed tab to see what they edited
- Leave at least one comment on a specific line — click the + icon that appears when you hover over a line, and write something like:
Looks good! I'd also like to learn that. - Click Review changes, select Approve, and click Submit review
- Click Merge pull request → Confirm merge
- Click Delete branch after merging
Coordinate with your team so each PR gets reviewed by a different person — nobody merges their own PR.
Check: All branches should be merged and deleted. The main or master branch should now contain all four updated intro files.
Who does this: Two team members (pick any two — call them Person X and Person Y)
A merge conflict happens when two people edit the exact same line of the same file. This exercise makes one happen on purpose so you can learn to fix it.
- Pull the latest
mainormaster:git pull - Create a new branch:
- Person X:
git checkout -b conflict/person-x - Person Y:
git checkout -b conflict/person-y
- Person X:
- Both open the file
team/shared-notes.md(create it if it does not exist yet with just a heading:# Shared Notes) - Both add a line at the very end of the file — but write different things:
- Person X writes:
Person X was here first. - Person Y writes:
Person Y was here first.
- Person X writes:
- Both save, stage, commit, and push their branch
- Both open a Pull Request into
mainormaster
- Whoever opens their PR second will see a message: "This branch has conflicts that must be resolved"
- Click Resolve conflicts
- GitHub will highlight the conflict with markers:
<<<<<<< conflict/person-y Person Y was here first. ======= Person X was here first. >>>>>>> mainNote: your repo may show
masterinstead ofmain— both are correct. - Edit the file to keep both lines (delete the
<<<<<<<,=======, and>>>>>>>markers):Person X was here first. Person Y was here first. - Click Mark as resolved, then Commit merge
- The PR can now be merged normally
Check: The team/shared-notes.md file on main or master should contain both lines.
At the end of all exercises, verify the following on the GitHub repo:
- A
team/folder exists with one intro file per team member - All intro files contain a learning goal (added in Exercise 3)
- The commit history shows commits from every team member
- All feature branches have been merged and deleted
-
team/shared-notes.mdcontains a line from both Person X and Person Y - Every team member has at least one merged Pull Request in the repo history