← All DevOps Flashcard Decks

Version Control & Git Workflows Flashcards

7 cards from real DevOps 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 & Git Workflows flashcards as text
  1. Which Git branching strategy uses long-lived branches named 'main', 'develop', 'release', and 'hotfix'?

    Answer: Gitflow

    Gitflow defines a strict branching model with dedicated branches for features, releases, and hotfixes alongside main and develop.

  2. What does the command 'git rebase -i HEAD~3' accomplish?

    Answer: Interactively edits the last 3 commits

    The '-i' flag enables interactive rebase, letting you squash, reorder, or edit the specified number of recent commits.

  3. In Trunk-Based Development, how often should developers integrate their changes into the main branch?

    Answer: At least once per day

    Trunk-Based Development requires developers to integrate to the main trunk at least daily to minimize merge conflicts and enable continuous integration.

  4. What is a 'fast-forward merge' in Git?

    Answer: A merge where the branch pointer simply moves forward without creating a merge commit

    A fast-forward merge occurs when the target branch has no new commits since the feature branch diverged, so Git just moves the pointer forward.

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

    Answer: git stash

    'git stash' stores your working directory changes and staged snapshot so you can switch context and reapply later.

  6. What is the purpose of a '.gitignore' file in a DevOps project?

    Answer: To specify files and directories Git should not track

    '.gitignore' tells Git which files or directories to exclude from version control, such as build artifacts, secrets, or dependencies.

  7. What is a Git 'tag' primarily used for in a DevOps release workflow?

    Answer: To mark specific commits as release points with a version label

    Git tags create named, immutable references to specific commits, making it easy to identify and retrieve exact release versions.