A branch is a parallel line of development. The default branch is usually main or master. Branches allow isolated work without affecting the main codebase.
We need a new feature branch off develop. Walk me through the exact git commands you’d run and why.
If you accidentally commit directly to main, how would you move that commit onto a new feature branch without losing history?
After finishing a feature, what steps do you take to merge it back while keeping the main branch stable?
Our team follows GitFlow, but a critical hotfix is required now. Explain how you’d use branches to deliver the hotfix without blocking ongoing feature work.
During a merge of a feature branch into develop you hit a conflict in a shared config file. How do you resolve it and prevent similar conflicts later?
A merge of a long‑lived feature branch caused the CI pipeline to fail. How would you investigate whether the problem is the merge strategy or branch divergence?
The monorepo has dozens of active branches and CI is slowing down. How would you redesign the branching strategy to improve throughput while preserving stability?
Compare short‑lived feature branches with frequent rebases versus long‑lived branches with merge commits. What are the trade‑offs for code review, CI load, and history readability?
Someone rebased a shared branch and force‑pushed, breaking downstream builds. How do you recover the branch and put safeguards in place?
We’re migrating from SVN to Git across multiple product lines and want to keep the existing branching model. How would you plan the migration to map SVN branches, preserve history, and minimize disruption?
Multiple autonomous squads share a core library but have independent release cadences. How would you structure branching and releases to enable independent delivery while avoiding integration hell?
Discuss the long‑term maintenance implications of moving from a GitFlow model to trunk‑based development as the organization scales from 50 to 500 engineers.