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.0

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.0
File Size Uploaded
git_version_sync-1.4.0.tar.gz 5.5 kB Details

Built distribution (wheel)

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

Total release size: 15.4 kB

Release files / git_version_sync-1.4.0.tar.gz

Download URL git_version_sync-1.4.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1a79d1d667453259685e825b2ff400ceb28a2224a9574e288cdcc97b5cd82b10
BLAKE2b-256 checksum
How to use checksums
f5c2d6e44455c4b3f047703c9477c77a11c4a64c993f28e10a45d6caab020144
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.0-py3-none-any.whl

Download URL git_version_sync-1.4.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab63f69bddc496114baa337af507177eb4aa42e8e0a6ddc69a3764b75cbb090a
BLAKE2b-256 checksum
How to use checksums
594d75bea68900321da1844ff7f2a97b51c9c8c341e19df7fa420ebb8a82ab26
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

1.4.1

2 release files

This release

1.4.0 This release

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