JavaScript Array Methods
50 JavaScript array method flashcards covering transformation, search, mutation, copying methods, iteration, and common pitfalls.
Programming flashcards
50 Git command flashcards for commits, branches, diffs, recovery, rebasing, worktrees, and debugging history.
This 50-card Git command deck covers the normal edit-stage-commit workflow, branch collaboration, patch inspection, and recovery tools such as restore, revert, reflog, and abort commands.
The notes call out history-rewriting and destructive boundaries so commands are learned with their consequences, not as a blind list.
This deck teaches common command intent, not every option or a replacement for checking repository policy before rewriting shared history.
Command intent and recovery guidance checked against current Git documentation on 2026-07-10.
| Front | Back | Study note |
|---|---|---|
| git init | Create a new Git repository in the current folder. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git clone <url> | Copy a remote repository to your machine. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git status | Show changed files and branch state. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git add <file> | Stage a file for the next commit. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git commit -m "message" | Create a commit with staged changes. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git log --oneline | Show compact commit history. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git diff | Show unstaged changes. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git diff --staged | Show staged changes. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git switch -c <branch> | Create and switch to a new branch. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git merge <branch> | Combine another branch into the current one. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git rebase <branch> | Reapply commits on top of another branch. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git fetch | Download remote changes without merging them. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git pull | Fetch and integrate changes from the remote branch. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git push | Upload local commits to the remote branch. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git restore <file> | Discard unstaged changes in a file. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git reset <commit> | Move the branch pointer, optionally unstaging changes. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git stash | Temporarily save uncommitted changes. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git cherry-pick <commit> | Apply a specific commit onto the current branch. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git blame <file> | Show which commit last changed each line. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git remote -v | List configured remote repositories and URLs. | Safety cue: inspect git status and the relevant diff before running a command that changes history or the working tree. |
| git branch | List local branches. | Add --all to include remote-tracking branches. |
| git switch <branch> | Switch to an existing branch. | Prefer switch for branch navigation; checkout also has unrelated file-restoration behavior. |
| git branch -d <branch> | Delete a fully merged local branch. | Use lowercase -d first; uppercase -D forces deletion. |
| git log --graph --oneline --all | Show a compact graph of all branch histories. | Useful for understanding merges and branch divergence. |
| git show <commit> | Show a commit and its patch. | Pass a path after -- to limit the display to one file. |
| git diff main...feature | Show changes introduced on feature since its merge base with main. | Three dots are useful for reviewing a branch as a pull request. |
| git add -p | Interactively stage selected hunks. | Helps split unrelated edits into focused commits. |
| git commit --amend | Replace the latest commit with the staged changes and/or a new message. | Avoid amending a shared commit unless you intend to rewrite remote history. |
| git revert <commit> | Create a new commit that reverses an earlier commit. | Usually safer than reset for history already shared with others. |
| git reset --soft <commit> | Move HEAD while keeping changes staged. | Useful for rebuilding recent local commits without discarding file changes. |
| git restore --staged <file> | Unstage a file while keeping its working-tree changes. | Check git diff afterward to confirm the edit remains. |
| git stash list | List saved stashes. | Each entry has a reference such as stash@{0}. |
| git stash push -m "message" | Stash tracked changes with a descriptive label. | Use -u when untracked files also need to be included. |
| git stash pop | Apply the newest stash and remove it if successful. | Use git stash apply when you want to keep the stash entry. |
| git reflog | Show recent local movements of HEAD and branch references. | Often the best recovery trail after an accidental reset or rebase. |
| git bisect start | Begin a binary search for the commit that introduced a problem. | Mark known endpoints with git bisect bad and git bisect good. |
| git tag -a <tag> -m "message" | Create an annotated tag. | Annotated tags store a tagger, date, and message and suit releases. |
| git push -u origin <branch> | Push a branch and set its upstream. | Later git push and git pull can use the configured upstream. |
| git remote add origin <url> | Add a named remote repository. | Origin is conventional, not mandatory. |
| git fetch --prune | Fetch updates and remove stale remote-tracking references. | It does not delete local branches. |
| git clean -n | Preview untracked files that git clean would remove. | Use the dry run before any destructive clean command. |
| .gitignore | Lists untracked path patterns Git should ignore. | It does not stop tracking files that are already committed. |
| git cherry-pick --no-commit <commit> | Apply a commit’s changes without creating the commit yet. | Useful when combining or editing selected patches. |
| git rebase -i <base> | Interactively reorder, squash, edit, or drop local commits. | Rewrites commit IDs; coordinate before changing shared history. |
| git merge --abort | Return to the state before a conflicted merge began. | Available when a merge is in progress and cannot be completed cleanly. |
| git rebase --abort | Return to the state before the current rebase began. | Use when resolving the rebase is not the right path. |
| git worktree add <path> <branch> | Check out another branch in a linked working directory. | Useful for parallel tasks without repeatedly switching one worktree. |
| git config --global user.name | Read or set the default author name for commits. | Use --local instead when one repository needs different identity settings. |
| git log -S"text" | Find commits where the number of occurrences of text changed. | Useful for locating when code or configuration was introduced or removed. |
| git shortlog -sn | Summarize commit counts by author. | Add --all to include all refs, not just the current history. |
Yes. It covers restore, revert, reflog, stash, merge/rebase abort, and safe inspection before cleanup.
Notes mark commands that rewrite history or can discard work and favor preview or reversible workflows.
Use the deck for recall, then practice each workflow in a disposable repository.
Yes. You can study it free in your browser on MazoCards. Create a free account to save progress, track streaks, and sync across devices.
50 JavaScript array method flashcards covering transformation, search, mutation, copying methods, iteration, and common pitfalls.
50 Python basics flashcards covering core syntax, collections, functions, files, exceptions, classes, typing, and everyday tools.
40 React 19.2 hook flashcards covering state, effects, refs, transitions, actions, external stores, common pitfalls, and when not to use a hook.
50 SQL flashcards covering queries, filtering, joins, aggregation, subqueries, CTEs, windows, transactions, constraints, and query plans.
CSS layout flashcards covering Flexbox, Grid, alignment, tracks, gaps, and responsive patterns.
Common network port flashcards for CompTIA-style networking, sysadmin, and developer review.
Study these 50 cards free, then create an account to save your progress and build a streak.