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.7.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.7.0
File Size Uploaded
git_version_sync-1.7.0.tar.gz 8.0 kB Details

Built distribution (wheel)

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

Total release size: 22.7 kB

Release files / git_version_sync-1.7.0.tar.gz

Download URL git_version_sync-1.7.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b55e9ef35cc5aca0ff763dfa0eb64f8469051a37595e3af8faba5b4c59f0ff1c
BLAKE2b-256 checksum
How to use checksums
b2366be26082227c94b3e174da612a29001337ec205047f6bb96dbb556143945
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 24, 2026.

Transparency log

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

Download URL git_version_sync-1.7.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d78c5ee1191eafcccec29feae93a3bf18c343266358aac16e4d1b6825c672f19
BLAKE2b-256 checksum
How to use checksums
7c397fe02ee7c9eda1f4a29cbb4d72c76ffadb36465937db2b24ba11fdaa185f
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.1

2 release files

This release

1.7.0 This release

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