Why GitHub suggest “prefix your version names with the letter v?”
This is the content at GitHub’s right sidebar:
Tagging suggestions It’s common practice to prefix your version names
with the letter v. Some good tag names might be v1.0 or v2.3.4.
How do I prettily print out a git-diff output? git pull via PHP exec IIS Capistrano 3 runs every command twice (new install) - Configuration issue Why do we use double dash in “git checkout — .”? What should be in my .gitignore for an Android Studio project? maven-release-plugin deploy goal fails on project with folder at top level in git repository
If the tag isn’t meant for production use, add a pre-release version
after the version name. Some good pre-release versions might be
v0.2-alpha or v5.9-beta.3.
Semantic versioning If you’re new to releasing software, we highly
recommend reading about semantic versioning.
I don’t understand why prefix your version names with the letter v? Please explain for me, why prefix version names with letter v is best-practice?
One Solution collect form web for “Why GitHub suggest “prefix your version names with the letter v?””
Most open source projects, and many tags on github and other open VCS sites, follow a format called Semantic Versioning, linked also in the quote in your question. This is the versioning model that suggests:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version
when you add functionality in a backwards-compatible manner, and
version when you make backwards-compatible bug fixes.
labels for pre-release and build metadata are available as extensions
to the MAJOR.MINOR.PATCH format.
The SEMVER recommendation has gone through a few revisions of its own, and at one point recommended prefacing a tag with a “v”, but these days I believe it does not mention the practice. Nevertheless, many sites, projects and conventions have followed this former SEMVER practice, and haven’t updated themselves to follow the newer recommendations.
My own opinion is that it probably doesn’t matter whether you start your tags with a “v” or not. But you may have an easier time using tools like
sort if you don’t.