AI Learning Hub › Learn AI › Self-Paced Courses › Codex Without the Code › Git & GitHub Without Fear
Module 5 · Builder
Git & GitHub Without Fear
Give a project a change history, make a commit, work on a branch, merge it back, and see where a pull request fits.
By the end
- Explain the difference between Git and GitHub
- Give a local project a change history
- Create a saved checkpoint with a commit
- Make one change on a separate branch
- Review and merge that change
- Understand where a GitHub pull request fits
Why learn this now?
Your practice project works, but you have changed it several times.
What if your next change breaks something? What if you want to compare today’s version with an earlier one? What if several people want to work on the same project? What if you want changes reviewed before they become part of the main version?
Git and GitHub help answer those questions. You do not need either one to begin using Codex, which is why we waited until now.
Nothing is being published yet
Turning this folder into a Git repository does not upload it to the internet or create a GitHub repository. The first part of this module keeps the project and its history on your computer.
GitHub comes later — and remains optional for this exercise.
Git
A system that keeps a history of changes to a project.
GitHub
An online service for storing Git repositories and collaborating on them.
Repository (repo)
A project whose files and change history are being tracked by Git.
Commit
A saved checkpoint in the project’s history.
Branch
A separate line of work where you can make changes without immediately changing the main version.
Pull request (PR)
A proposal on GitHub to review changes before merging them into another branch.
Merge
Bringing changes from one branch into another.
Git is not GitHub
This distinction matters:
- Git can work entirely on your computer. It keeps the project’s history and lets you create branches and commits.
- GitHub is an online service built around Git. It adds sharing, collaboration, online review, pull requests, and other team workflows.
In this module, you will first use Git locally. You do not need a GitHub account for the hands-on exercise.
Step 1 — Ask Codex whether this project already has history
Prompt to try
Before making any changes, inspect this project and tell me: - whether it is currently a Git repository; - whether it already has any Git history; - what would change if we initialized Git here; and - whether initializing Git would publish or upload anything. Do not make any changes yet.
Codex should tell you that this folder does not yet have Git history. The important point is that creating local history and publishing a project online are separate decisions.
Step 2 — Start a local history
Prompt to try
Initialize Git for this project locally. Then create the first commit as a baseline of the project in its current state. Use a short, clear commit message that describes this as the starting point for the tutorial project. Do not connect to GitHub. Do not create a remote repository. Do not publish, push, or upload anything. When finished, tell me: - whether Git was initialized successfully; - whether the first commit was created; - the commit message you used; and - whether anything left this computer.
What just happened?
Your files should look exactly the same. The difference is that Git now has a checkpoint representing this version of the project, which gives later changes something to compare against.
A commit is not a backup service and it is not a GitHub upload. It is a saved point in this project’s local history.
Step 3 — Make one change on a separate branch
The visible heading on the practice page now says:
SLS Practice Resource Guide
But the browser-tab title still says:
SLS Community Resource Guide
This is a small, low-risk change — a good first reason to use a branch.
Prompt to try
Create a new branch named: fix-page-title On that branch only, change the HTML document title from: SLS Community Resource Guide to: SLS Practice Resource Guide Do not change the visible page heading or anything else. Review the change and create a commit with a short, clear message. Do not merge the branch yet. When finished, tell me: - which branch I am on; - which file changed; - what changed; - the commit message; and - whether anything was published or uploaded.
The change now exists on a separate branch. Think of the branch as a reviewable line of work rather than a second permanent copy of the project: the main version has not accepted this change yet, and that separation gives you a chance to inspect the result before deciding whether it belongs there.
Step 4 — Decide whether the change belongs in the main project
Check before merging
Review the fix-page-title branch without merging it. Confirm: - that only the HTML document title changed; - that the visible page heading did not change; - that the search feature still works; - that no other project files changed; and - what will happen if this branch is merged into the main branch. Do not merge anything yet.
A merge is an acceptance decision. Codex can prepare and explain the change, and you should know what you are accepting before you merge it.
Step 5 — Accept the change
Prompt to try
Merge the completed fix-page-title branch into the main branch locally. Do not connect to GitHub. Do not publish or push anything. After merging: - confirm which branch I am on; - confirm that the title change is now part of the main project; - confirm that the working files have no unintended changes; and - summarize the local history we created in this module. Do not delete the branch unless I ask.
So where does GitHub fit?
Everything you have done so far can happen locally. GitHub becomes useful when you want the repository to live online so that you can share it, collaborate with other people, or use an online review workflow. One common GitHub workflow is:
Branch → make changes → commit → open a pull request → review → merge
A pull request is not the change itself. It is a proposal to review and accept changes from one branch into another.
For this tutorial, you can stop here. You do not need to publish the practice project to GitHub.
Optional: ask Codex what publishing would involve
Optional prompt
Do not publish this project. Explain what steps would be required if I later wanted to put this local Git repository on GitHub and collaborate through pull requests. Clearly distinguish: - what would happen on my computer; - what would create or change something on GitHub; and - which steps would require my approval or account access. Do not take any of those actions.
What to notice
Git did not make you a programmer; it gave your project a history. A commit created a checkpoint, a branch gave one change its own line of work, and a merge accepted that reviewed change into the main project.
GitHub can extend that workflow online, though it is not required for the local history you just created. The important skill is understanding where a change is, whether it has been saved, and whether it has been accepted into the main version.
Checkpoint
You are ready for Module 6 if you can:
- explain the difference between Git and GitHub;
- explain what a repository is;
- describe a commit as a saved checkpoint;
- explain why you might use a branch;
- review a branch before merging it;
- explain what merging does; and
- describe a pull request as a GitHub review proposal rather than a mysterious coding requirement.
You do not need to memorize Git commands to understand this workflow.