Explain a common Git branching strategy (Gitflow).
Quick Answer
Gitflow uses long-lived main (production) and develop (integration) branches, plus short-lived feature/, release/, and hotfix/ branches. Features merge to develop; releases stabilize then merge to main and develop; hotfixes branch from main.
Detailed Answer
Gitflow suits scheduled, versioned releases but adds branch overhead and merge complexity. Many teams now prefer trunk-based development (short-lived branches merged frequently into main behind feature flags) because it pairs better with CI/CD and reduces long-lived-branch merge pain. Pick based on release cadence.
Interview Tip
Describe Gitflow accurately but note trunk-based development is favored for continuous delivery — showing you know the trade-off scores higher.