QA signs off on a build, and production must run exactly that code. How does Git support this?
IntermediateScenarioBranching Strategies and Releases
Answer
Situation read → The risk is rebuilding from a branch and getting different results.
What I'd do →
- Build once per commit; name artifacts by commit SHA (for example the image tag
app:3f9a1c2). - Deploy that exact tag to QA, then production; never rebuild.
- Tag the release on the same SHA:
git tag -a v2.5.0 3f9a1c2. - Record the SHA in deployment metadata so
git logexplains what runs where.
Why → Branch names move, SHAs do not.
Interview tip → Pair this with pinned dependencies and lockfiles for true reproducibility.
More on Branching Strategies and Releases
An eight-person team deploys several times a day. Which branching strategy do you recommend?IntermediateWhen would you choose GitFlow over trunk-based development?IntermediateIn trunk-based development, a feature will take three weeks. How do you merge it daily without exposing it?IntermediateYou are cutting a release. How do you manage the release branch and late fixes?IntermediateShould releases use lightweight or annotated tags?BeginnerA release tag was placed on the wrong commit and has been published. What do you do?Intermediate