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.5.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.5.0
File Size Uploaded
git_version_sync-1.5.0.tar.gz 6.2 kB Details

Built distribution (wheel)

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

Total release size: 16.7 kB

Release files / git_version_sync-1.5.0.tar.gz

Download URL git_version_sync-1.5.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7a74cf0313daf2ae8213e5cad74e53f16c71bc1cfe836f19ea7f9c7ef82a3974
BLAKE2b-256 checksum
How to use checksums
5202eafdb37d1ab1f33f6f9c06a47c3a79d3dddd09bc72456ff1c05b99de1c18
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.5.0-py3-none-any.whl

Download URL git_version_sync-1.5.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86ac8f88bfd2ac75ae8dfc196bebee10a79b8baf57f265f6ac5851c1a97c3a96
BLAKE2b-256 checksum
How to use checksums
e272e5b5b92fe53f60ec916c763ac90b34ecaa9d4475c2ec67bddee56d6adaf2
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

This release

1.5.0 This release

2 release files

1.4.1

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