A 15-minute course
Follow three friends as they build a story game called Space Llama together, without ever losing anyone's work.
Swipe, drag, or use the arrow keys to turn the page.
Two helpers
When lots of people build one project, work can get erased and nobody remembers who changed what. Coders use two tools to fix that.
Remembers every version of your project, right on your computer.
Like a camera that snaps a photo each time you save.
A website that puts the project online, so the whole team can work on it.
Like a photo album everyone on the team can open.
Repository
It holds every file, plus the history of every change ever made. Tap a file to see what it's for.
maya/space-llamaPublic
The cover page. It tells visitors what the project is and how to use it.
The words of the story. Git remembers every change to every sentence.
Priya's drawing of the llama in her space helmet. Pictures can live in a repo too.
The code that makes the game run, like what happens when you press the jump button.
A public repo is like a library book: anyone can read it. A private repo is like a diary: only people you invite can open it.
Commit
Each commit saves a snapshot of the project with a short note about what changed. Add to the story, then tap an older dot to go back in time.
Branch
Leo wants the llama to breathe fire. He tries it on his own branch, so the game everyone else uses can't break.
Pull request
Before Leo's idea joins the main project, a teammate checks it. Green lines are new. Red lines are removed.
Leo wants to add 2 commits to main
Merge conflict
Maya and Leo both changed the same line on their own branches. Git can't guess which one is right, so it asks a person to choose.
story.txt · line 3Conflict
MMaya's change
The spaceship is pink.
LLeo's change
The spaceship is gold.
Line 3 will say
Inside the file, Git marks a clash with arrows like <<<<<<< and >>>>>>> so you can find it.
Rebase
While Leo worked on his branch, Priya added a new commit to main. Rebase lifts Leo's commits and sets them on top of the newest main.
Clone and fork
Each one gives you your own copy of a repo. The difference is where the copy goes.
Copies a repo onto your computer, so you can work on it there.
Like checking out a library book and taking it home.
Copies someone else's repo into your own GitHub account.
Like photocopying a friend's comic so you can draw your own ending.
After you fork a project, you can still send your best ideas back to the original with a pull request.
Push and pull
Maya cloned the repo, so she works on her own copy and trades updates with GitHub. Help her get both copies to match.
Maya's laptop
GitHub
Quiz
Word bank
You learned the big ones. Here they are with a few more you'll hear, all in one place.