Short answer: for daily work you need status, add, commit, pull and push, plus switch and merge for branches. Learn restore, revert and reflog early too: they are how you get back from a mistake without losing work.
Git has more than a hundred commands, and tutorials tend to start with the rare ones. Fear of the command line usually comes from not knowing how to undo, so this list ends with the ways back.
The time in the last column jumps to the moment the video shows the command in a real terminal.
Which commands start a project?
| Command | What it does | Video |
|---|---|---|
git init | Turns the current folder into a repository. | 0:20 |
git clone <url> | Copies a repository, with its history, to your computer. | 0:29 |
git config | Sets your name and e-mail, once per computer with --global. | 0:37 |
Which commands save your work?
| Command | What it does | Video |
|---|---|---|
git status | Shows what changed and what is staged. Run it often. | 0:46 |
git add <file> | Stages a change for the next commit. | 0:54 |
git commit -m "..." | Saves the staged changes as one step in history. | 1:03 |
git log --oneline | Lists the commits, one per line. | 1:13 |
git diff | Shows the changes line by line. | 1:22 |
Which commands work with branches?
| Command | What it does | Video |
|---|---|---|
git branch | Lists branches, or makes one with a name. | 1:31 |
git switch <branch> | Moves to a branch; -c creates it first. | 1:37 |
git merge <branch> | Brings another branch's commits into yours. | 1:47 |
git rebase <branch> | Replays your commits on top of another branch for a straight history. | 1:56 |
Which commands share with a remote?
| Command | What it does | Video |
|---|---|---|
git fetch | Downloads new commits without changing your files. | 2:06 |
git pull | Fetches and merges into your branch in one go. | 2:15 |
git push | Sends your commits to the remote. | 2:24 |
How do you undo a mistake in Git?
Pick by where the mistake is:
| The mistake | Command | Video |
|---|---|---|
| Unfinished work in the way, but you want to keep it | git stash, later git stash pop | 2:34 |
| A file changed and you want the last committed version back | git restore <file> | 2:43 |
| Commits on your own branch that should not be there | git reset <commit> (--hard also throws the changes away) | 2:53 |
| A commit that is already pushed and shared | git revert <commit>: a new commit that undoes it | 3:03 |
| A commit you lost after a reset or rebase | git reflog: every place your branch has been, so you can go back | 3:14 |
The rule that saves the most trouble: never reset or rebase commits other people already pulled. Use revert there.
Where can you check this?
What comes after your first push?
Once your projects are on GitHub, your profile page is the first thing people see. Profile README Studio builds the README for it from 31 layouts and 45 block types, with a preview that looks the way GitHub shows it. How to make a GitHub profile README walks through the repository it lives in.

