ZL
About Articles Contact
Published on Sep 28, 2018
Filed under:
#video,
#git

Semantic Versioning

We created numbers like 1.0.0 and 1.0.1 for releases and hotfixes when we worked on Git Flow. What do these numbers represent, and why do we use them?

These numbers represent the version number of the product we put out in the world. We use them because we’re following a best practice called Semantic Versioning.

When we use Semantic Versioning, developers will know whether a change will break their code. The numbers give a clue to the kind of changes that have occurred.

Many popular projects use Semantic Versioning. Examples are React and Vue.

Understanding Semantic Versioning

A semantic version has three numbers. The rightmost number is a patch version.

Patch Versions

Patch versions are used for bugfixes. There are no functionality changes. (That’s why we use a patch version when we released a hotfix in the previous lesson).

When you increase a new patch, you increase the rightmost number by 1. From 1, you increase it to 2, then to 3, and so on.

If your patch number is 9, when you increase the patch version again, you increase it to 10, then 11, then 12, and so on. (There are no limits to the numbers)

A patch version is the rightmost number

Minor versions

The second number is called the minor version number. It is used when you release new functionality in your project.

When you increase the minor version, you also increase it by one. But when you increase the minor version, you must reset the patch version to zero.

A minor version is the second number

Major versions

The leftmost number is a major version. When you increase the major version, you tell people that there are backward-incompatible changes. People may experience breakage if they use the next version.

When you increase the major version number, you reset both patch version and minor versions.

A major version is the leftmost number

Pre-releases

If you want to create a pre-release (like an alpha or beta version), you can add a -, followed by the words alpha or beta.

There are no hard and fast rules for pre-releases, so you can name them anything you want. Usually, we use alpha or beta, followed by a number, like alpha1.

Starting a project

Most people start projects with 0.1.0. When you’re ready to release the project to the public, you increase the version to 1.0.0.

Previous Undoing changes in Git Next What not to save into a Git repository

Join My Newsletter

I share what I’m learning on this newsletter: code, building businesses, and living well.

Sometimes I write about technical deep-dives, product updates, musings on how to live, and sometimes my struggles and how I’m breaking through.

Regardless of the type of content, I do my best to send you an update every week.

If you’re into making things and growing as a person, you’ll probably feel at home here.

“

Zell’s writing is very accessible to newcomers because he shares his learning experience. He covers current topics and helps all readers level up their web development skills. Must subscribe.

Chen Hui Jing
Chen Hui Jing — Web Developer
The Footer

General

Home About Contact Testimonials Tools I Use

Projects

Magical Dev School Splendid Labz

Socials

Youtube Instagram Tiktok Github Bluesky X

Follow Along

Email RSS
© 2013 - 2025 Zell Liew / All rights reserved / Terms