What is semantic versioning, and how do Git tags relate to it?
Semantic versioning uses MAJOR.MINOR.PATCH. Bump major for breaking changes, minor for new backward-compatible features, patch for bug fixes. Teams tag each release commit, such as v2.3.1.
Explain it simply
Version numbers should tell users how risky an upgrade is. Version 2.3.1 is read as major 2, minor 3, patch 1.
A patch bump (2.3.1 to 2.3.2) means only bug fixes. A minor bump (2.3 to 2.4) adds features without breaking anything. A major bump (2 to 3) may break existing users. The numbers reset to the right when a left number increases, so 2.4.5 becomes 3.0.0. A tag like v2.3.1 on the exact commit makes the release reproducible and lets CI build it.
Example
1.4.2 -> 1.4.3 bug fix
1.4.3 -> 1.5.0 new feature, nothing breaks
1.5.0 -> 2.0.0 breaking change
git tag -a v1.5.0 -m "Add CSV export"What to say in the interview
"Semantic versioning is MAJOR.MINOR.PATCH, where major signals breaking changes, minor adds compatible features, and patch fixes bugs. I tag each release commit with the version, for example v1.5.0, so it can be rebuilt exactly."