Repo Reorganization

Before you start your project, you're going to turn your repo from a pile of files into an organized portfolio. Everyone does this, whatever your level. If you finish early, help a neighbour.

Why Bother?

Your repo is turning into a portfolio, and people outside this class might see it one day. Unit folders keep it readable, and they keep each project's history with the project.

What You're Aiming For

When you're done, your repo should look like this. Your repo name is CP11portfolio or CP12portfolio, whichever you made in 0.2.

CP11portfolio/
├── README.md               ← portfolio front page
├── .gitignore
├── 0_getting_started/
│   └── (your Unit 0 files)
├── 1_foundations/
│   ├── practice/           ← lesson notebooks (1.1–1.8 or 1.EXT)
│   └── adventure_game/     ← 1A/1B/1C or 1X/1Y/1Z
└── 2_quiz_engine/          ← named after YOUR project
    ├── README.md           ← project design log
    ├── main.py             ← (2C: your language's files)
    └── tests/              ← 2D only

You might already have 0_getting_started and 1_foundations from Units 0 and 1, whichever language you worked in. That's great, you're partway there. Today is mostly about sorting what's inside them and catching any stray files.

Naming Rules

  • Lowercase snake_case, no spaces: adventure_game, not Adventure Game
  • Unit number first, so folders sort in order
  • Name your Unit 2 folder after your actual project: 2_habit_tracker, not 2_project
  • Why: folder names become part of the web address once your portfolio site goes live, and spaces or capitals there cause broken links

More on this: Naming Conventions.

Steps

Step 1: Fetch and pull

Open GitHub Desktop and make sure your portfolio repo is the Current Repository. Click Fetch origin. If the button changes to Pull origin, click it.

Don't skip this one. It's the #1 way people end up with a merge conflict on day one.

Step 2: Close your open files

In VS Code, close any notebooks or files you have open. Moving a file while it's open can leave behind a duplicate copy.

Step 3: Create your unit folders

In VS Code, go to File → Open Folder and open your repo folder on your H: drive. In the Explorer panel, use the New Folder icon to create any folders you don't have yet:

  • 0_getting_started (in the repo root)
  • 1_foundations (in the repo root)
  • practice and adventure_game (both inside 1_foundations)

Step 4: Move your files

Drag each existing file into the right folder:

  • Unit 0 files (your "make it yours" script, the 0.3 notebook) → 0_getting_started
  • Lesson notebooks (1.1–1.8, or 1.EXT.1 and 1.EXT.2) → 1_foundations/practice
  • Your adventure game project files (1A/1B/1C, 1X/1Y/1Z, or the Your Language projects) → 1_foundations/adventure_game

If VS Code asks whether you're sure you want to move a file, say yes. Don't edit anything yet. Only move things around.

Step 5: Add a .gitignore

A .gitignore file tells git which files to leave out of your repo, like the cache folders Python and Jupyter make on their own.

  1. Download the file below and open it. Copy everything in it.
  2. In VS Code's Explorer, click on empty space at the bottom so nothing is selected, then click the New File icon. That puts the new file in your repo root.
  3. Name it exactly .gitignore, with the dot at the start and no .txt at the end.
  4. Paste in the contents and save (Ctrl+S).
Download gitignore.txt

Why is it a .txt? Browsers don't download files that start with a dot very well, so you're copying the contents into a new file instead.

Step 6: Check GitHub Desktop

Switch back to GitHub Desktop and look at the Changes list on the left. Files you moved should show up as renamed, with an arrow from the old path to the new one. They should not show up as one file deleted and another added.

Seeing deleted + added instead? You probably edited a file as well as moving it. Put a hand up before you commit.

Step 7: Commit and push

In the Summary box at the bottom left, type Reorganize repo into unit folders. Click Commit to main, then click Push origin.

Step 8: Set up your Unit 2 project folder

You don't need your final project idea yet. A working name is fine, and you can rename the folder later (do it on its own commit).

  1. In VS Code, create a new folder in the repo root named after your project, like 2_quiz_engine or 2_tip_splitter.
  2. Download the README template below and save it into that folder.
  3. Rename it from README_template.md to README.md.
  4. In GitHub Desktop, commit with a message like Add Unit 2 project folder and README, then Push origin.
Download README_template.md

Gotcha: Move First, Then Edit

Move, commit, then edit. If you rename or move a file and change what's inside it in the same commit, git may treat it as a brand-new file. When that happens, the file loses its history, and that history is your design log.

Update Your Front Page

Your root README.md is the first thing anyone sees when they open your repo. Now that it's organized, update it so it has:

  • About Me: a short developer intro (the one from 0.2 is a fine start)
  • A list of your unit folders: each with a link and a one-line description
  • AI Collaboration: keep your existing Unit 0 entries here

Something like this:

# CP11portfolio

## About Me
Hi, I'm ... , and I'm taking Computer Programming 11/12 this semester.

## My Work
- [0_getting_started](0_getting_started/) — setting up VS Code, GitHub and my first scripts
- [1_foundations](1_foundations/) — Unit 1 practice and my text adventure game
- [2_quiz_engine](2_quiz_engine/) — my Unit 2 project: a quiz that ...

## AI Collaboration
(your Unit 0 entries stay here)

Commit and push when you're done.

New from Unit 2 on: AI notes go in each project's own README, in its AI Collaboration section, instead of on the front page.

What's Next

Head back to the Unit 2 page and open your level's page. Then start filling in the Pitch section of your new project README.