IC151 ยท GitHub assignments

Your lab, start to finish

Get into GitHub, do the assignment, show your TA. Your repositories are waiting for you — there is nothing to look up here.

Where your assignments are

Once you have joined GitHub and accepted the invitation, every assignment you have been given is already listed in your own repositories. Nothing to search for, no link to construct.

They also appear on your GitHub home page as soon as you sign in. If you see nothing at all, you have not accepted the invitation yet — work through the checklist below.

Start of the lab — work through this list

  1. Boot the machine into Ubuntu, not Windows. The compiler and check.sh are set up there.
  2. Open a private browser window (Ctrl+Shift+N in Chrome, Ctrl+Shift+P in Firefox) and sign in to your Gmail in that window. Closing a private window signs you out, so the next student at this machine cannot reach your account.
  3. Create your GitHub account first, in that same private window: go to github.com and choose Continue with Google, picking the institute address you just signed in with. Already have an account on that address? Just sign in with it.
  4. Only then, search your Gmail for GitHub, open the invitation email, and click Join IC151Jul2026. Opening that link before your account exists is what sends people round in circles.
  5. Your repositories are now listed under github.com/IC151Jul2026. Open the one for today's assignment.

A GitHub 404 means your account does not have access yet, or the invitation is still pending. The invitation also appears at github.com/notifications once you are signed in.

Nothing there, or a 404?

An empty list and a 404 mean the same thing on GitHub: this account cannot see the repository. Work through these in order.

How to do the assignment

Red boxes show where to click. Use Method B in the lab — it is the one that produces the check.sh output your TA has to see. Method A is a shortcut for small fixes from any machine.

Method B — download, check on your machine, upload back (do this one)

B1 Click Code, then Download ZIP. Unzip it and keep the folder name exactly as it is.

B2 Edit main.cpp in any editor, then open a terminal and check that your code actually runs before you submit it:

# go into the folder you unzipped
# (tip: type "cd " then drag the folder onto the terminal window)
$ cd ~/Downloads/helloworld-B3-260000000-main

# compile it and run it yourself
$ g++ -std=c++17 -Wall -Wextra -pedantic main.cpp -o main
$ ./main
260000000

# run the official check
$ chmod +x check.sh
$ ./check.sh
260000000
PASS: output contains roll number 260000000

The $ is the prompt, not part of the command — selecting and copying the block leaves it out.

If you get FAIL: ... instead, fix main.cpp and run ./check.sh again. The chmod line is needed once because unzipping removes the executable bit. The check reads your roll number from the folder name, so do not rename the folder. If g++ is not found, install the compiler for your system first.

B3 Back on your repository page, choose Add file → Upload files.
B4 Drag in your edited main.cpp (or use choose your files), leave Commit directly to the main branch selected, and press Commit changes.

Method A — edit straight on GitHub (no download)

A shortcut for changing a few lines when you are not at a lab machine. Your edit is committed the moment you press the green button, so this submits your work by itself — but it never runs check.sh, so it cannot be what you show your TA.

A1 Open main.cpp and click the pencil.
A2 Replace REPLACE_WITH_YOUR_ROLL_NUMBER with your roll number, then press Commit changes. Keep the branch as main.
Editing on your own machine does not submit anything. Your submission is whatever is stored in your GitHub repository. After committing, open main.cpp on GitHub and confirm your own code is there. The last commit on main at the deadline is what gets graded.

Before you leave the lab

  1. Run ./check.sh until it prints PASS.
  2. Show your TA the output of ./check.sh on your screen.
  3. Sign the attendance sheet.
  4. Then you may leave.

Your commit still has to be on GitHub — a PASS on your own machine is not a submission.