โ† 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. What is 'semantic versioning' (SemVer) and which format does it use?

    Answer: A versioning scheme using MAJOR.MINOR.PATCH

    Semantic versioning uses MAJOR.MINOR.PATCH where MAJOR breaks compatibility, MINOR adds features backward-compatibly, and PATCH fixes bugs.

  2. What is the purpose of a Git 'hook'?

    Answer: A script that runs automatically before or after specific Git events

    Git hooks are shell scripts placed in the .git/hooks directory that execute automatically at key points like pre-commit, post-merge, or pre-push.

  3. When using a monorepo, what is a common challenge teams face with Git?

    Answer: Slower clone and fetch times due to the large repository size

    Monorepos can become very large over time, causing slow clone, fetch, and checkout operations that require tools like Git LFS or sparse checkout to mitigate.

  4. What does 'git bisect' help a DevOps engineer do?

    Answer: Identify which commit introduced a bug using binary search

    'git bisect' performs a binary search through commit history, marking commits as good or bad until it pinpoints the exact commit that introduced a regression.

  5. Which practice ensures that configuration and infrastructure definitions are stored and versioned alongside application code?

    Answer: GitOps

    GitOps uses Git as the single source of truth for both application and infrastructure state, with automated reconciliation to apply declared configurations.

  6. What is the main risk of using 'git push --force' on a shared branch?

    Answer: It overwrites remote history, potentially losing teammates' committed work

    Force pushing rewrites the remote branch history, which can erase commits others have pushed, causing data loss and broken local copies.

  7. What is the recommended approach when a long-lived feature branch falls significantly behind the main branch?

    Answer: Rebase the feature branch onto the latest main to incorporate updates

    Rebasing the feature branch onto the latest main replays its commits on top of current changes, keeping history clean and reducing final merge conflicts.