PHPackages                             zeeshan/git-semver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zeeshan/git-semver

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zeeshan/git-semver
==================

v1.0.0(9y ago)79163PHP

Since Sep 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zeeshanu/git-semver)[ Packagist](https://packagist.org/packages/zeeshan/git-semver)[ RSS](/packages/zeeshan-git-semver/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

git-semver
==========

[](#git-semver)

[![Build Status](https://camo.githubusercontent.com/ba3d4720195442cd5fdb4944e3d5b313dc63d36ec1396849fad84a859802dbd8/68747470733a2f2f7472617669732d63692e6f72672f7a65657368616e752f6769742d73656d7665722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zeeshanu/git-semver)[![Latest Version](https://camo.githubusercontent.com/e1f747027287b82f81c7cc41d8e3da49e4383f7186fc1cc09ba351cdc34e85f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7a65657368616e752f6769742d70726f66696c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/zeeshanu/git-profile/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

> A CLI tool to generate [semantic versioning](http://semver.org) compliant tags for your git repositories.

Install
-------

[](#install)

- Download the file from [here](https://github.com/zeeshanu/git-semver/releases/download/v1.0.0/git-semver)
- Assign required permissions `sudo chmod -R 755 git-semver`
- Run `sudo mv git-semver /usr/local/bin/git-semver`

Usage
-----

[](#usage)

Below is the signature for command

```
$ git semver  [options]
```

Where `patch`, `minor` or `major` specifies the type of release that you are about to make.

- `patch` use this option when you make backwards-compatible bug fixes
- `minor` use this option when you add functionality in a backwards-compatible manner
- `major` use this option when you make incompatible API changes

### Options

[](#options)

In addition to the type of release i.e. `patch`, `major` or `minor`, you can add following options to modify the behavior of command

- `--fetch` Fetch the remote tags before applying the version (Recommended)
- `--prefix` Prefix to prepend to the tag e.g. `--prefix=v` to prepend `v` i.e. for tags similar to `v1.0.1`
- `--postfix` Append to the tag e.g `--postfix="-live"` to append `-live` to generate tags similar to `1.2.3-live`

Examples
--------

[](#examples)

Find some of the usage examples below

### Tag Examples

[](#tag-examples)

- Below command creates a patch release i.e. increment the last part of the tag by 1 e.g. it will generate `x.y.1`, if the last tag was `x.y.0`

```
$ git semver patch
```

- Below command creates a minor release i.e. middle part of the tag will be incremented e.g. if the last tag was `x.2.z` then it will become `x.3.z`

```
$ git semver minor
```

- Below command will create a major release i.e. the first part of the tag will be incremented e.g. if the last tag was `0.y.z` then it will become `1.y.z`

```
$ git semver major
```

### Fetching Remote Tags

[](#fetching-remote-tags)

If you would want to fetch the remote tags before creating the tag, then use the `--fetch` option. For example

```
$ git semver patch --fetch
```

Above command will make sure that the remote tags are fetched before creating a new tag. On a sidenote, it is recommended to add this flag e.g. if you are working in a team it is quite possible that you might not have some tag locally and creating a tag without fetching might end up in duplicated tags.

### Prefix and Postfix Usage

[](#prefix-and-postfix-usage)

1. Prefix If you want to create a release while prefixing some keyword e.g. `v` then you can provide that using `--prefix` option. For example:

```
$ git semver patch --prefix=v
```

The above command will generate tags with `v` prefixed e.g. `v1.0.0` or `v1.3.2`.

2. Postfix If you would like to append something to the end of created tag you can use `--postfix` option. For example, if you would want to append `-dev` to the tag, you can do the below

```
$ git semver patch --postfix=-dev
```

This will result in something along the lines of `3.5.1-dev` depending upon the last tag

A Real World Example of Semantic Versioning
-------------------------------------------

[](#a-real-world-example-of-semantic-versioning)

Some useful examples of semantic versioning are given below:

```
v0.0.0 // New project
v0.1.0 // Add some functionality
v0.2.0 // Add other new functionality
v0.2.1 // Fix bug
v0.3.0 // Add some functionality
v0.3.1 // Fix bug
v0.3.2 // Fix bug
v0.3.3 // Fix bug
v0.3.4 // Fix bug
v0.4.0 // Add some functionality
v0.4.1 // Fix bug
v0.4.2 // Fix bug
v1.0.0 // Code is being used in production
v1.1.0 // Add some functionality
v1.2.0 // Add other new functionality
v1.2.1 // Fix bug
v2.0.0 // Implement changes that causes backwards incompatible

```

Contribution
------------

[](#contribution)

Feel free to fork, improve, create issues and spread the word.

License
-------

[](#license)

MIT © [Zeeshan Ahmed](http://github.com/zeeshanu)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93f670b66ad848731a36e428e51d2ba2e50f881121257b4ce3e8783344673f09?d=identicon)[zeeshanahmad](/maintainers/zeeshanahmad)

---

Top Contributors

[![ziishaned](https://avatars.githubusercontent.com/u/16267321?v=4)](https://github.com/ziishaned "ziishaned (30 commits)")[![joaopms](https://avatars.githubusercontent.com/u/4002159?v=4)](https://github.com/joaopms "joaopms (1 commits)")[![omajid](https://avatars.githubusercontent.com/u/174451?v=4)](https://github.com/omajid "omajid (1 commits)")

---

Tags

gitsemvergit

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zeeshan-git-semver/health.svg)

```
[![Health](https://phpackages.com/badges/zeeshan-git-semver/health.svg)](https://phpackages.com/packages/zeeshan-git-semver)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M24.7k](/packages/friendsofphp-php-cs-fixer)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
