Github + PR
About 13 min read
C3 - Git + GitHub + the PR-Safety Discipline
(weight: 7%)
The company brain lives in a repo, and a repo is shared. The moment a founder hands you write access, the question they are quietly asking is not "can you code" but "will you change the thing everyone depends on without breaking it for everyone else." That is what this domain certifies.
The cost of getting it wrong is not abstract: one push straight to main can break the brain the whole team works off of, and one leaked key in a commit can drain a card before anyone notices. You do not earn the keys by promising to be careful. You earn them by working inside a loop that makes the careless mistake hard to make.
Watch
The main course teaches the git mechanics, not the safety discipline, so watch in two passes and know what each one gives you.
▸ Git basics and setup (the master timeline of mpALXah_PBg): watch from 0:43:18 to 0:59:17 -> Build & Sell with Claude Code (10+ Hour Course) . This is plans, models, and the first project, with git installed underneath it. Use it to get your bearings on what a repo even is.
▸ The GitHub + work-trees block: watch from 7:42:32 to 7:56:59 -> Build & Sell with Claude Code (10+ Hour Course) . This is the closest the course comes to git-as-workflow.
Be honest with yourself about what the course does NOT do: it treats GitHub as a place to save and version your work, not as a safety gate with a guard at the door. The branch-to-commit-to-push-to-PR-to-review-to-merge loop as a discipline is barely shown there. So fill the gaps with these, each on its own clock starting at 0:00:
▸ Installing Git (if Claude Code says "Git is required"): Chronixel, How to install git for claude code - Claude Code Installation - Git is required for local sessions .
▸ Turning on two-factor authentication: Just Kristers, How to Set Up 2 Factor Authentication With GitHub (Tutorial 2026) .
▸ Branch protection (requiring review before a merge, and the real caveat that it is not free on a private repo): Eddie Jaoude, GitHub branch rules (protect your git branches) .
▸ CODEOWNERS (who gets pulled in to review what): Swiftful Thinking, How to Add Branch Rules, CodeOwners, Pull Request Templates | Git & Source Control #11 .
SSH keys for Build step 8 (generate a key, add it to GitHub, push without a password). The course never shows this, so this short clip fills it:
▸ Create & Add SSH Keys To GitHub For Authentication (NeuralNine, 6:05): Create & Add SSH Keys To GitHub For Authentication. This is your C3 SSH fill, and it is on-method: it runs ssh-keygen -t ed25519 (our standard), starts the ssh-agent, uploads the PUBLIC key to GitHub, then clones and pushes over SSH with no password.
Caveat: SSH keys are the alternate, power-user auth path here, not the daily driver, your everyday GitHub auth is gh auth login per the setup canon, so treat SSH as optional-but-good-to-know, not the route you reach for first. The creator calls SSH "more secure than tokens"; both are key-based, so a scoped fine-grained PAT is just as secure.
SSH's real edge is convenience for repeated use, not security. The clip also stops at the key itself; it does NOT run git remote -v or contrast SSH versus HTTPS remotes, and that reasoning is this cert's own narration layer (step 8 plus the troubleshooting table), so add it yourself.
○ Windows note: this video is recorded on Mac/Linux, so a few commands may not run as-is in Windows PowerShell. On Windows, run the ssh-keygen steps in Git Bash (installed with Git for Windows), where the commands match the video.
The key generation command is the same: ssh-keygen -t ed25519 -C "your-test-email". If PowerShell does not recognize a command from the video, switch to Git Bash rather than troubleshooting PowerShell.
GitHub's own guide "Generating a new SSH key" (search it on docs.github.com) has the Windows-specific steps.
The full guarded-merge system that FF runs on top of these primitives is its own domain (C7). You meet the mechanics here; you meet the gate there. [VIDEO: TBD - John records: the FF auto-reviewer live] is where the proprietary piece gets shown, and it belongs to C7, not C3.
Read (the principles)
The five plain words. A repo is the brain saved on disk: every file, plus the full history of how it got there. A branch is a safe copy you can change without touching what everyone else is using.
A commit is a labeled checkpoint you can always come back to. A push uploads your branch to GitHub so it leaves your machine. A pull request (PR) is the doorway into main, with a guard standing at it.
Analogy: main is the live, shared kitchen the whole restaurant cooks in; a branch is your own prep station where you can make a mess; a PR is the pass where someone checks the plate before it goes out.
Cost of getting it wrong: if you do not know which of these you are touching, you will eventually change the shared kitchen mid-service and not realize it until plates come back.
The four-move loop: branch, commit, push, open a PR. Every piece of work travels the same path. You make a branch off main, commit your changes in small labeled checkpoints, push the branch up, and open a PR to ask for it to come into main. You never write straight onto main.
Analogy: you do not edit the master document while ten people are reading it; you make a copy, mark your changes, and submit the copy for merge.
Cost of getting it wrong: a commit straight to main skips the only checkpoint that protects the team. It is the single highest-blast-radius mistake in this whole domain, and it is an automatic fail in this cert for exactly that reason.
More than one commit, on purpose. A commit is cheap and it is a save point. Operators commit several times during one piece of work so that if a later step goes wrong, they can roll back to the last good checkpoint instead of losing everything.
Analogy: save points in a game. You do not play three hours and save once at the end.
Cost of getting it wrong: one giant commit at the end means a single bad line buries good work, and there is no clean place to roll back to.
Secrets never enter the repo, protected by a four-link chain. Keys live in a .env file on your machine. .gitignore lists .env so git refuses to track it. A safe-to-share .env.example carries the names of the keys, never the values.
And a secret-scan stops anything key-shaped before it can be merged. All four links hold the line together.
Analogy: the house key stays on your keyring at home; the list on the fridge says "front door key" but is not itself a key anyone can use.
Cost of getting it wrong: a committed key is public the instant it is pushed, even if you delete it a second later, because the history remembers. A leaked key is a company-brain incident, not a typo. This is the second automatic fail in this domain.
Some actions have no undo. Pushing to main, force-pushing, hard-resetting, deleting or dropping things, overwriting files: these are stop-and-think moves. Before any of them, you name the blast radius out loud and confirm. Normal commits and PRs are reversible; these are not.
Analogy: a regular edit is a pencil mark you can erase; a force-push is a shredder. You do not feed the shredder on autopilot.
Cost of getting it wrong: one un-thought destructive command can erase shared history that the whole team and every automation depends on, with nothing to roll back to.
Write access, not Admin. A teammate doing the work needs Write: the ability to make branches and open PRs. Admin is changing repo settings and adding or removing people, which is almost never the operator's job. You give the least access that does the job, and no more.
Analogy: the new line cook gets a key to the kitchen, not the deed to the building.
Cost of getting it wrong: over-granting access is the most common cause of damage in a shared brain. The person who can change settings can also, by accident, turn off the very gate that was keeping everyone safe.
The PR gate keeps a competent, well-meaning team safe anyway. The gate is not an accusation that anyone is careless. It exists because even good operators have bad moments, and the cheapest place to catch a mistake is before it reaches main, not after. The gate is a friend, not a slowdown.
Analogy: a pilot's pre-flight checklist is not an insult to the pilot. It is how good pilots stay good ones.
Cost of getting it wrong: a team that merges its own work with no second look ships its mistakes straight into the brain everyone trusts.
Two-factor authentication before access, always. Nobody touches the company brain without 2FA turned on. A password alone is a single point of failure, and a single point of failure on a shared repo is a single point of failure for everyone in it.
Analogy: a deadbolt on top of the doorknob lock. One lock is a suggestion.
Cost of getting it wrong: one phished password with no second factor hands a stranger write access to the brain.
Git is not GitHub. Git is the tool on your machine that tracks changes and makes commits. GitHub is the website where the repo lives so a team can share it. If Claude Code says "Git is required," that is the local tool missing, not a GitHub account problem.
Analogy: git is the word processor on your laptop; GitHub is the shared drive you save the file to.
Cost of getting it wrong: you waste an hour fixing the wrong thing because you confused the local tool with the shared website.
Build (your sandbox artifact)
You build one clean run of the safe-save loop, end to end, in your own disposable repo named AIOS_CERT_C3_[FirstName]_Sandbox (use your real first name). Inside it you make a branch named exactly AIOS_CERT_C3_[FirstName]_FirstChange, make a small change to a simple file (for example notes.md), commit it twice, push the branch, and open a PR into main that you leave open.
The nothing real, ever rule applies in full: this is a synthetic sandbox, no real client data, no real names, no live keys, no internal URLs anywhere in it. If a .env exists in your sandbox, it stays on your machine and out of every commit.
Before You Record: Field Notes
▸ Two auto-fails end the run no matter what: anything touching main directly, and any secret visible on screen. The PR must stay OPEN; never self-merge.
▸ SSH key: only ever display id_ed25519.pub (public). Never cat the private key (no .pub). Press Enter through every ssh-keygen prompt to accept defaults. If it says the key exists, type n and reuse it, or re-run with -f ~/.ssh/id_ed25519_cert.
Prove (record it + how it is judged)
Record one continuous, face-on-camera, voice-narrated screen-share doing the whole loop live, in this order. Narrate your decisions, not your clicks, in your own words.
- Open your AIOS_CERT_C3_[FirstName]_Sandbox repo on screen. Confirm out loud that 2FA is on your GitHub account, and if you are on Desktop or an IDE, that git --version returns a version number.
- Create a branch off main named exactly AIOS_CERT_C3_[FirstName]_FirstChange, and show on screen that you are on the branch, not on main.
- Edit one simple file, commit it with a clear message, then make a second small edit and commit again, so two checkpoints show in the history.
- Before or at your first commit, show git status (or the source-control panel) confirming any .env is ignored and not staged, and say in your own words that .gitignore keeps the secret on your machine.
- Push the branch and confirm it appears in the repo's branch list in the browser.
- Open a PR from your branch into main with a clear title and a one-line description, and leave it open. Say out loud that the open PR is the deliverable and that self-merging would leave nothing to review.
- Go to Settings -> Collaborators -> Add people, begin inviting a teammate (a second account you control, or your founder), and show the permission dropdown with Write selected on screen. Explain in your own words why Write and not Admin, and why operators go through branches and PRs and never straight to main.
a. Note on repo visibility for this step: adding collaborators and showing the Write-not-Admin permission dropdown behaves differently on a free private repo. If you cannot demonstrate the collaborator/permission flow on your private sandbox, make this C3 demo repo public first (synthetic content only, exactly like the C7 public-repo rule), then show the collaborator step.
Do not put any real data in a repo you make public, and remember public means public forever including history.
- Generate an SSH key in the sandbox, add it to your GitHub account, then run git remote -v on screen and say which auth method this repo is using: a git@github.com: remote is SSH (a device key), an https:// remote is HTTPS (a token or PAT). Explain in your own words why a push that never prompts you is normal, not a security hole, because the device key IS the authentication.
- Close by stating, in your own words, what a branch, a commit, a push, and a PR each are.
Must show (tick these off as you record):
▸ An SSH key generated and added to GitHub, with git remote -v run on screen and the auth method named correctly.
▸ The repo named AIOS_CERT_C3_[FirstName]_Sandbox visible on screen.
▸ 2FA confirmed on the account (and git --version if on Desktop/IDE).
▸ The branch named exactly AIOS_CERT_C3_[FirstName]_FirstChange, with proof you are on it, not on main.
▸ At least two commits visible in the history (two beats one).
▸ git status / source-control showing .env is ignored and not staged (or said clearly if no .env exists).
▸ The branch pushed and appearing in the browser's branch list.
▸ An open PR into main with a real, openable URL, left unmerged.
▸ The Settings -> Collaborators add-people flow with Write selected on screen.
▸ A spoken, own-words explanation of Write-not-Admin and why never straight-to-main.
▸ A spoken, own-words plain-language definition of branch / commit / push / PR.
What good looks like: voice on throughout, face on camera, one unbroken take with the live run actually happening on screen. You explain the decisions in your own words rather than reading this doc aloud.
The whole loop is real: a branch off main, two commits, a push, and an open PR with a working URL, with the .env clean. A silent recording or a slideshow of screenshots is not a Loom.
Two things end the run no matter how good the rest is: anything that touches main directly, and any secret on screen. And the PR stays open, because if you merge it yourself there is nothing left for a reviewer to look at.
The Daily Rhythm in Practice: /start-my-day and /wrap-up
Everything in this module - branch, commit, push, PR, review, merge - collapses into two commands you run every session. This is how you operate safely in a shared repo for the rest of your time as an operator, without having to remember the git steps yourself.
Hands-on (do this in your sandbox now): run /start-my-day and let it sync you, put you on a branch, and make you define what "done" looks like. Make one small change.
Then run /wrap-up and confirm it self-reviewed your diff, pushed your branch, and opened a PR. Take a screenshot of the opened PR for your submission.
Know your hooks (you will be asked about these): two small programs run automatically and you cannot turn them off by accident. (1) The staleness nudge tells you, when you open the repo, whether you are behind the official version - it only reads, it never changes your files.
(2) The dangerous-command guard stops and asks before any command that could permanently delete unsaved work (a hard reset, a force delete). You never work around a guard unless a human explicitly says yes.
Knowledge check: (a) Why do you never work directly on main? (b) What does /wrap-up do that protects work sitting only on your laptop? (c) The guard just stopped you before a hard reset - what is the right next move?
Rest stop
That is the discipline that makes you safe to hand the keys to. Branch, checkpoint, push, ask. Your progress is saved and your PR is sitting there, open, exactly as it should be. Stop here if you need to. Nobody runs this whole cert in one sitting, and you are not meant to.