Git & GitHub
From your first repository and commit through branches, merge conflicts, safe undo, remotes and GitHub Flow. Practise the essential commands instantly in a safe Git simulator.
Every chapter is an island. Finish its lessons, beat its challenge, and sail on ⛵
Island 1
Basics: from file to commit
- Why version control?What Git solves, and how it differs from GitHub and random backup copies.8 min2 🎮
- From working tree to commitUnderstand the three areas and use status, add and commit confidently.11 min2 🎮
- Read history and differencesUse log, show, diff and diff --staged before judging or committing changes.10 min2 🎮
- .gitignore and useful commit messagesExclude generated and sensitive files, and write understandable history.9 min2 🎮
Island 2
Branches and merging
- Branches and HEADA branch is a movable name, and HEAD says where you are.10 min2 🎮
- Merge: fast-forward and three-wayCombine a branch and understand when Git moves a name or creates a merge commit.11 min2 🎮
- Resolve merge conflictsRead markers, choose the right result, and know when to abort.12 min2 🎮
- Park work temporarily with stashClean the working tree without a fake commit, then restore work.9 min2 🎮
Island 3
Undo without losing work
- Restore and unstageRestore a working file or remove it from staging without moving history.9 min2 🎮
- Reset: soft, mixed and hardSee exactly how each mode moves HEAD, staging and files.12 min2 🎮
- Revert or reset?Revert adds a safe correction; reset rewrites the branch line.10 min2 🎮
- Amend and reflog: rescue recent workRepair the last commit and understand the local safety log of HEAD movements.10 min2 🎮
Island 4
Remotes and GitHub Flow
- Remotes, push and trackingConnect a local repository to a shared copy and push a branch safely.10 min2 🎮
- Fetch, pull and rejected pushesSynchronize team work, inspect before merging, and handle non-fast-forward rejection correctly.12 min2 🎮
- GitHub Flow: complete projectTurn an issue into a branch, commits, a pull request, review and a deployable merge.14 min2 🎮