Learn Git and GitHub
How to save every change to your code, and how a team shares one project without wiping out each other's work. Thirteen lessons start with your first commit. Then come branches, merges and the ways to undo a mistake. The last ones cover remotes, GitHub, pull requests and the rules teams set for branches. It assumes nothing. It stops at Git and the sites that host it. Building and shipping the code is a separate subject.
Not started
0 of 13 lessons done
Level 1 · Your first commits
score0250/12 wordsWhat Git is and where it keeps your history. How to save a change, and how to read the changes you saved.
- Version Control and GitWhat version control is, and why most coders use Git for it. How one hidden folder in your repo holds your whole history.9 min3 terms
- Git Add and CommitHow a change goes from your files into Git's history. What the staging area is for, what git status tells you, and how .gitignore keeps files out.12 min5 terms
- Git Log and Git DiffHow to read the history you saved. What a good commit message looks like, what the long commit hash is, and how a diff shows each changed line.12 min4 terms
Level 2 · Branches and merges
score25500/11 wordsHow to work on the side while main stays safe. The ways to join work back, and what to do when two changes clash.
- Git Branches and HEADWhat a branch is, why making one costs almost nothing, and why most repos call the home branch main. How HEAD shows where you are standing.12 min4 terms
- Git Merge and ConflictsHow Git joins one branch into another. Fast-forward, merge commit and squash merge side by side, and how to fix a merge conflict by hand.14 min4 terms
- Git Rebase and Cherry-PickHow rebase moves your commits onto a newer main, and why it gives them new hashes. How cherry-pick copies one fix, like a hotfix, to another branch.13 min3 terms
Level 3 · Undo and set aside
score50650/6 wordsThree ways to take back a commit, and which one is safe to share. How to park work, and how to name a release.
- Undo a Git CommitThree ways to take back a commit: revert, reset and amend. Which one is safe on a branch others have, and which one can lose your work for good.13 min3 terms
- Git Stash and Git TagsHow git stash parks half-done work so you can switch branches. How a tag names a release like v1.0, and why tags need a push of their own.11 min3 terms
Level 4 · Remotes and GitHub
score65850/15 wordsHow your copy talks to the shared one. The sites that host Git, and how a change gets reviewed before it joins.
- Git Clone, Push and PullHow your copy of a repo talks to the shared one. What a remote and origin are, and what clone, push, fetch and pull each move.13 min5 terms
- GitHub, GitLab and BitbucketThe three big sites that host Git repos, and what each one adds to Git. How GitHub Issues tracks bugs, and how one line in a pull request closes one.12 min5 terms
- Pull Requests and ForksHow a pull request asks for a branch to be merged, and how a review catches bugs first. How a fork lets you offer a fix to a project you cannot change.13 min5 terms
Level 5 · Working as a team
score851000/8 wordsThe rules that keep main working, and the two branch plans teams most often pick between.
- Branch Protection and HooksHow branch protection keeps broken code off main, and how a Git hook runs a check before each commit. Why the hook alone cannot protect a team.12 min3 terms
- Git Branching StrategiesHow teams decide which branches exist and how work gets back to main. Trunk-based development against Git Flow, and where a monorepo fits in.13 min5 terms
Words in this course
The 52 glossary entries this course teaches, in the order it teaches them. Open any of them on its own.
- Version Control
- Git
- Repository
- Working Directory
- Staging Area
- Commit
- Git Status
- .gitignore
- Commit Message
- Commit Hash
- Git Log
- Diff
- Branch
- Main Branch
- Feature Branch
- Git HEAD
- Merge
- Fast-Forward Merge
- Squash Merge
- Merge Conflict
- Rebase
- Cherry-Pick
- Hotfix
- Git Revert
- Git Reset
- Git Commit Amend
- Git Stash
- Git Tag
- Semantic Versioning (SemVer)
- Remote Repository
- Git Clone
- Git Push
- Git Fetch
- Git Pull
- GitHub
- GitLab
- Bitbucket
- GitHub Issues
- Jira
- Pull Request
- Code Review
- Git Fork
- Open Source Software
- CONTRIBUTING File
- Branch Protection
- Git Hook
- Continuous Integration (CI)
- Branching Strategy
- Trunk-Based Development
- Git Flow
- Monorepo
- Feature Flag