โ† All Web Development Flashcard Decks

Version Control Flashcards

7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Version Control flashcards as text
  1. What does `git rebase` do compared to `git merge`?

    Answer: Rebase rewrites commit history by replaying commits onto a new base

    Git rebase replays commits from one branch onto another, creating a linear history without a merge commit.

  2. Which command shows the commit history as a graph in the terminal?

    Answer: git log --graph --oneline

    `git log --graph --oneline` displays an ASCII graph of the branch and merge history alongside condensed commit info.

  3. What is a 'detached HEAD' state in Git?

    Answer: HEAD points directly to a commit instead of a branch

    A detached HEAD occurs when HEAD points to a specific commit SHA rather than a branch name.

  4. What does `git cherry-pick ` do?

    Answer: Applies the changes from a specific commit onto the current branch

    Cherry-pick applies the diff introduced by a specific commit onto the currently checked-out branch.

  5. In Git, what is the purpose of `.gitignore`?

    Answer: Specifies intentionally untracked files that Git should ignore

    `.gitignore` lists patterns of files and directories that Git should not track or include in commits.

  6. What happens when you run `git fetch` without `git merge`?

    Answer: Remote changes are downloaded but your working directory is not updated

    `git fetch` retrieves remote changes into your local repository's remote-tracking branches without altering your working files.

  7. Which Git command is used to temporarily save uncommitted changes without committing them?

    Answer: git stash

    `git stash` shelves your working directory changes so you can switch contexts and reapply them later.

How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy