Git Commands Every Dev Knows
by FlashQuest
16 flashcards on everyday Git commands and what each one does. Basics include git init, git clone, git add ., git commit and git status. Syncing cards cover git push, git pull and git fetch. Branching cards cover git switch, git checkout -b, git merge and git rebase. The rest ask about git log, git diff, git stash and git restore. Every card has an explanation.
After you install, search the Table for “Git Commands Every Dev Knows”.
All 16 cards in this deck.
Made by FlashQuest. Last updated October 2026. Drafted with AI help.
- Command to stage all changes in the current directory?
- git add .
- The trailing dot is a pathspec for the current directory, so new, modified, and deleted files are all staged.
- Command to record staged changes as a new snapshot in the repository's history?
- git commit
- Add the -m flag to write the commit message inline instead of opening an editor.
- Command to download a complete copy of a remote repository for the first time?
- git clone
- It copies the full history, not just the latest files, and names the remote 'origin'.
- Command to upload your local commits to the remote repository?
- git push
- It updates the remote branch to match yours, and fails if the remote has commits you don't.
- Command to fetch remote changes and merge them into your current branch in one step?
- git pull
- It's shorthand for git fetch followed by git merge (or rebase, if configured).
- Command to see which files are modified, staged, or untracked right now?
- git status
- It's the safest Git command: it only reports and never changes anything.
- Which modern command (Git 2.23+) is dedicated solely to changing branches?
- git switch
- Unlike checkout, it cannot restore files, which makes it harder to misuse.
- Which classic command plus a one-letter flag creates a new branch and moves onto it in one step?
- git checkout -b
- The modern equivalent is git switch -c.
- Command to list the commit history of the current branch?
- git log
- Add --oneline for a compact one-commit-per-line view.
- Command to show the line-by-line changes you haven't staged yet?
- git diff
- Add --staged to compare the staging area against the last commit instead.
- Command to combine another branch's commits into your current branch?
- git merge
- If both branches changed the same lines, Git pauses and asks you to resolve the conflict.
- Command to shelve uncommitted changes temporarily so you can switch tasks with a clean tree?
- git stash
- git stash pop reapplies the most recent stash and removes it from the stash list.
Show the other 4 cards
-
Command to download new commits from the remote without merging them into your branch?
git fetch
It updates remote-tracking branches so you can inspect changes before merging.
-
Which modern command discards working-directory changes to a file (introduced alongside git switch)?
git restore
With --staged it unstages a file without touching your edits.
-
Command to replay your branch's commits on top of another branch for a linear history?
git rebase
Because it rewrites history, avoid it on branches other people share.
-
Command to create a brand-new, empty Git repository in the current folder?
git init
It creates the hidden .git directory where all history will live.
Every card is here to read. Study them in the app, with spaced repetition bringing back the ones you miss.
Decks like this one.
- Python Basics: Syntax & Core Concepts FlashQuest · 50 cards · ~25 min Ready to play
- Tech Acronyms Decoded FlashQuest · 17 cards · ~10 min Ready to play
- Computer Science: Core Concepts FlashQuest · 16 cards · ~10 min Ready to play
Study it properly.
All 16 cards are in the app, scheduled so the ones you miss come back sooner.