Git & GitHub Interview Question #84

What is semantic versioning and how is it commonly used with Git tags?

GitHub Collaboration, Repository Rules, Issues, Releases & Actions CI/CD Mid-Level Intermediate

Quick Interview Answer

Semantic Versioning uses a version format such as MAJOR.MINOR.PATCH. In the standard model, major versions represent incompatible API changes, minor versions add backward-compatible functionality, and patch versions contain backward-compatible fixes.

Detailed Explanation

Semantic Versioning uses a version format such as MAJOR.MINOR.PATCH. In the standard model, major versions represent incompatible API changes, minor versions add backward-compatible functionality, and patch versions contain backward-compatible fixes.

Git tags are commonly named with versions such as v2.3.1 so the exact source commit for a release can be identified. A project should follow its own documented versioning policy consistently.

Code Example

git tag -a v2.3.1     -m "Release 2.3.1"

git push origin v2.3.1