Interview Prep/Git & GitHub/Branching Strategies and Releases

You forgot to tag last week's release and need to tag it now.

BeginnerScenarioBranching Strategies and Releases
Answer

Situation read → A tag can be created on any past commit.

What I'd do →

  1. Find the deployed commit: git log --oneline --since="10 days ago" or the SHA in your deploy record.
  2. git tag -a v2.4.0 <sha> -m "Release 2.4.0".
  3. git push origin v2.4.0.
  4. Back-fill the GitHub release if needed.

Why → Tags point at commits, not at "now".

Interview tip → Always confirm the SHA against what was actually deployed.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branching Strategies and Releases