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.8.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.8.1
File Size Uploaded
git_version_sync-1.8.1.tar.gz 8.5 kB Details

Built distribution (wheel)

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

Total release size: 24.4 kB

Release files / git_version_sync-1.8.1.tar.gz

Download URL git_version_sync-1.8.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5f2fc456ae5446f555e5fbdacc00c39fc07b58e2b00147fe4be3d7770b0157a0
BLAKE2b-256 checksum
How to use checksums
23fbdb121c2f5f19bacd8aadcb078eef04b035757584420ae7679547ff5af406
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 25, 2026.

Transparency log

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

Download URL git_version_sync-1.8.1-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5a45675ef9dec87ddc16ab1fb24f08943e7d29fe565b4b307c36a9a0a59a7ec
BLAKE2b-256 checksum
How to use checksums
10934904c0d58b90731c469062a574637b5eba6928294ca0a8cba8562188262f
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 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.8.1 This release

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

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