Interview CI/CD & GitOps

What is semantic versioning, and how do you apply it to releases?

CI/CD & GitOps · Advanced level

Answer

Semantic versioning uses MAJOR.MINOR.PATCH. A patch version is backward-compatible bug fix, a minor version adds backward-compatible functionality, and a major version introduces breaking changes. I tie release notes and automated versioning to commit or PR semantics.

Technical explanation

Automated versioning should be deterministic and based on agreed signals such as conventional commits or release labels.

Tag creation, changelog generation, artifact publishing, and deployment promotion should be part of the same release trail.

Git history is both collaboration state and audit evidence, so choose merge, rebase, revert, and reset based on whether history is shared.

Short-lived branches reduce merge conflicts and make CI feedback meaningful; long-lived branches increase drift and integration risk.

Tags, release branches, signed commits, and changelogs connect source history to released artifacts and operational traceability.

Prefer safe, reviewable operations on shared branches: revert bad changes, open PRs for backports, and avoid force-pushes unless the team explicitly coordinates them.

Hands-on example

1. Practice the Git operation for: What is semantic versioning, and how do you apply it to releases in a throwaway repository with main, feature, release, and hotfix branches.

2. Create commits on multiple branches, then run the relevant commands: git merge, git rebase main, git cherry-pick <sha>, git revert <sha>, git tag -a v1.2.3, or git reset --hard only on a private branch.

3. Inspect the result with git log --oneline --graph --decorate --all and verify whether history was preserved, replayed, tagged, or safely undone.

4. Push through a pull request with required CI checks, run tests after conflict resolution or cherry-pick, and document why that operation was chosen.

5. For release scenarios, build from a signed tag, publish the artifact with the commit SHA and version, and confirm the release notes match the merged changes.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More CI/CD & GitOps interview questions

← All CI/CD & GitOps questions