⚡
Browse

Common Git Commands and What They Do

Learn the essential Git commands and the action each one performs.

Code30 items3 levelsDifficulty 2/5
Start training →

Free · no signup · works on any device

Levels

Start easy — harder levels unlock as you improve, or jump ahead anytime.

1
Basics
9 items
2
Branching & Remotes
10 items
3
Advanced
11 items

All 30 cards

git init
→
Create a new repository
git clone
→
Copy a remote repository
git status
→
Show working tree status
git add
→
Stage changes
git commit
→
Record staged changes
git log
→
Show commit history
git diff
→
Show changes between versions
git rm
→
Remove a tracked file
git mv
→
Move or rename a file
git branch
→
List or create branches
git checkout
→
Switch branches or restore files
git switch
→
Switch branches
git merge
→
Combine branches
git remote
→
Manage remote connections
git fetch
→
Download remote changes
git pull
→
Fetch and merge remote changes
git push
→
Upload commits to remote
git tag
→
Create or list tags
git restore
→
Discard changes in working tree
git stash
→
Temporarily save changes
git rebase
→
Reapply commits onto another base
git reset
→
Undo commits or unstage changes
git revert
→
Undo a commit with a new commit
git cherry-pick
→
Apply a specific commit
git reflog
→
Show reference history
git bisect
→
Find a bug by binary search
git blame
→
Show who changed each line
git clean
→
Remove untracked files
git show
→
Display object details
git config
→
Set configuration options

Keep going

Useful Bash One-Liners

Learn what common Bash commands and one-liners actually do, in both directions.

Code32 items

Vim Commands and Motions

Learn what essential Vim commands and motions do, from basic movement to powerful editing.

Code42 items

Essential Linux/Unix Terminal Commands

Master the core Linux and Unix shell commands and recall exactly what each one does.

Code40 items

Regular Expression Tokens and Their Meanings

Master what each common regular-expression token, anchor, and metacharacter matches.

Code37 items