⚠
Privacy Notice: When you sign in with GitHub, your quiz attempts are stored in Google Firebase so you can track your progress. This data is only accessible to the course instructor, is not otherwise shared, and will be deleted at the end of the semester. For earlier deletion, contact the instructor. Prefer to stay anonymous? Use guest mode or a GitHub account without your real name.
Loading...

02 Quiz: Feature Branch Development

Score: 0 / 16

Instructions

  • Some questions include Git graphs in the style of the VS Code Git Graph visualizer — study them carefully before answering.
  • Each question has 4 options with exactly one correct answer.
  • You can retry incorrect answers; immediate feedback explains the reasoning.

Graph legend:

main commit feature commit branch branch pointer HEAD
Question1 Git States

You’ve just edited main.py to fix some PEP8 violations. What state is this file in before you run git add?

Question2 Git States

Your teammate asks why Git has a staging area instead of just committing changes directly from the working directory. What is the BEST explanation?

Question3 Branches

In the graph below, main keeps moving forward with stable commits while experimental work happens on feature (including WIP commits).

"stable" "stable" "stable" "WIP" "experiment" "WIP fix" main feature

What is the PRIMARY purpose of this separation into a feature branch instead of working directly on main?

Question4 Push & Remote

Locally, your repository looks like this — feature has three commits that are not yet on GitHub:

main origin/main feature

You run git push -u origin feature for the first time. What is the resulting state?

Question5 Commit Practices

You’ve fixed multiple PEP8 violations in a file: import problems, spacing issues, and naming conventions. What is the BEST commit strategy?

Question6 Pull Requests

What is the PRIMARY purpose of a Pull Request (PR)?

Question7 Branch Lifecycle

Your Pull Request was just approved and merged into main. The graph now looks like this:

"Merge PR #42" main feature

What should you do with the feature branch now?

Question8 Git States

You run git status and see a file listed under both ‘Changes to be committed’ AND ‘Changes not staged for commit’. What does this mean?

Question9 Branch Protection

Your team has enabled branch protection on main. You try to push directly to main and get an error. What is happening?

Question10 Pull Requests

You’ve been working on a large feature that touches 15 files and changes over 2000 lines. What is the BEST approach for your Pull Request?

Question11 Commit Practices

Which commit message follows best practices for professional development?

Question12 Branch Workflow

You’re starting work on a new feature. Locally, you see the following state — your local main is outdated, the team has pushed two commits to origin/main in the meantime:

"init" "old" "team A" "team B" main (local) HEAD origin/main

What is the correct first step before you start coding?

Question13 Code Review

During code review of your Pull Request, a teammate suggests adding type hints to your functions. What is the BEST response?

Question14 Pull Requests

You’ve opened a Pull Request (commit “PR open”). Your teammate requests changes. You respond with two more commits (“review fix” and “type hints”) and push them to the same feature branch:

"feat" "PR open" "review fix" "type hints" main feature

What happens to the PR?

Question15 Workflow Philosophy

What is the fundamental principle behind the feature branch workflow?

Question16 Diverged Branches

While you were working on your feature, a teammate merged their PR — so main has moved forward. The graph now looks like this:

B M1 M2 C1 C2 C3 main feature

Which statement about this state is correct?

© 2026 Dominik Mueller   •  Powered by Soopr   •  Theme  Moonwalk