Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Git & GitHub Module 13

Teamwork and open source interview questions

Interview questions on teamwork and open source: short warm-ups, then what each harder question tests, the first step of a good answer and its follow-ups.

6 questions: 2 warm-ups and 4 with model answers · Levels: Fresher to senior

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher

    What is the difference between GitHub flow and Git flow?

    Answered in the lesson Team workflows: GitHub flow, trunk-based, Git flow

  2. Fresher

    What is the difference between a ruleset and a branch protection rule on GitHub?

    Answered in the lesson Set up a repository for collaborators

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Mid to senior

    Your product has a cloud version that deploys from main several times a day and a self-hosted server that customers install. A new self-hosted version ships every two weeks, and customers expect security fixes for a year. Design the branches, say where each fix lands first, and keep the number of supported branches manageable.

    What it tests
    Release branches for installed versions, the direction of backports, a support policy that bounds the branch count, and the automation that keeps fixes from being forgotten.
    First step
    Count first: a release every two weeks supported for a year means 26 live branches, which nobody can test. So the first decision is a support policy, such as long-term releases, and only then the branch layout: main for the cloud, one release branch per supported version, fixes on main first.
    Follow-ups

    From the lesson Team workflows: GitHub flow, trunk-based, Git flow

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; nothing renews unless you choose to. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Mid to senior

    Your team runs a web app with one production version on Git flow. Releases are cut every two weeks, a finished feature waits about six days to reach users, and every release takes an afternoon of merging. You propose trunk-based development. What do you change, in what order, and what could go wrong?

    What it tests
    Measuring lead time, a staged migration through GitHub flow, the prerequisites of trunk-based development (fast checks, flags, small changes) and the risks of moving too fast.
    First step
    Measure before changing anything: lead time from merge to production, how long branches live, how often a release or hotfix merge conflicts. Then move in steps. Retire develop by making main the integration branch with the same protections, keep short feature branches with pull requests, and only then shrink them towards daily integration.
    Follow-ups

    From the lesson Team workflows: GitHub flow, trunk-based, Git flow

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  3. Fresher to mid

    You become admin of your college club's public repository. All twelve members can push to main, the build broke three times last week, and nobody knows who reviews what. You have one afternoon. What do you set up, in what order, and what do you deliberately leave for later?

    What it tests
    Prioritising protections by risk, least-privilege roles, required checks that can actually report, code owners, and not burying a small team in process.
    First step
    Stop the damage first: a ruleset on main that blocks force pushes and deletions and requires a pull request with one approval and the test check, after confirming that the check runs on every pull request. Then fix access: move members to the lowest role that fits, and only after that add code owners and templates.
    Follow-ups

    From the lesson Set up a repository for collaborators

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  4. Mid to senior

    Your CODEOWNERS file names one senior developer as owner of src/, and main's ruleset requires a code owner's approval. Pull requests now wait three days on average, most of them for her. How do you remove the bottleneck without losing the protection the rule was meant to give?

    What it tests
    How code-owner review works, ownership by teams and narrower paths, review load balancing, and measuring wait times instead of guessing.
    First step
    Measure where the wait is: time from opening to first review, per owner and per path. Then spread the ownership: make a team the owner instead of a person, split src/ into the areas people really know, and keep the single owner only for the files where her judgement is the protection.
    Follow-ups

    From the lesson Set up a repository for collaborators

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All Git & GitHub interview questions · The Git & GitHub track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.