Skip to main content

git-version-sync

A command-line tool to synchronize semantic versions between Git tags and pyproject.toml.

Features

  • Check version status and consistency between Git tags and pyproject.toml
  • Sync version discrepancies with flexible sync directions
  • Bump versions following semantic versioning (major, minor, patch)
  • Auto Push option to push commits and tags directly to remote
  • Custom annotations for Git tags
  • Force mode for bypassing version mismatches

Installation

Requirements

  • Python >= 3.11
  • Git
pip install git-version-sync

Or with pipx for isolated installation:

pipx install git-version-sync

From Source

git clone <repository-url>
cd git-version-sync
pip install -e .

Usage

Check Command

Verify version consistency between Git tags and pyproject.toml:

git-version-sync check

Options:

  • --fetch - Fetch remote tags before checking

Sync Command

Synchronize versions when discrepancies are detected:

git-version-sync sync

Options (mutually exclusive):

  • --to-git - Force pyproject.toml version to match the highest Git tag
  • --to-config - Force Git tag to match pyproject.toml version

Bump Command

Increment the version in pyproject.toml and create a corresponding Git tag:

git-version-sync bump {major|minor|patch}

Options:

  • -f, --force - Force bump even if version mismatch occurs
  • -p, --push - Automatically push commit and tag to remote
  • -m, --message MESSAGE - Custom annotation message for the Git tag

Examples

Check current version status

$ git-version-sync check
Version is synchronized with highest local tag (v1.0.0)

Bump patch version

$ git-version-sync bump patch
Success bump version to v1.0.1

Bump minor version with custom message and auto-push

$ git-version-sync bump minor -m "Add new features" -p
Success bump version to v1.1.0
Pushing commit and tag to remote...

Bump major version with force flag

$ git-version-sync bump major -f
Success bump version to v2.0.0

Sync to Git tags

$ git-version-sync sync --to-git
Successfully synced version to match highest tag

Dependencies

  • packaging>=26.3 - For version parsing and comparison

License

See LICENSE file for details.

Author

Finsa-SC

Release files for git-version-sync 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-version-sync 1.4.1
File Size Uploaded
git_version_sync-1.4.1.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-version-sync 1.4.1
File Interpreter ABI Platform
git_version_sync-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / git_version_sync-1.4.1.tar.gz

Download URL git_version_sync-1.4.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a57234b5b5d4eba945e00894cba90c3557f78d9aff4bbdba225f0899c838f6a6
BLAKE2b-256 checksum
How to use checksums
a37420014514386c5017b6ebd43d13f6cb9343cc0a612794d382091bf4dc18f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / git_version_sync-1.4.1-py3-none-any.whl

Download URL git_version_sync-1.4.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc8d6636dab20a6b47f461d51e4609c1ec53bdd195d33b522f3ce151c1382d63
BLAKE2b-256 checksum
How to use checksums
cae656d6d0a062798a002d6b570161d64b2294153096cd5e2350be842c9b1197
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

This release

1.4.1 This release

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page