Skip to main content

Manage multiple git repos from a single .pgit config file.

Project description

polygit

Manage multiple git repos from a single .pgit config file.

pip install polygit

Usage

pgit sync      # clone missing repos, fetch all
pgit status    # show repos with uncommitted changes
pgit pull      # pull all repos, auto-stashing local changes
pgit push      # interactively commit and push dirty repos
pgit repos     # discover drift between .pgit and the filesystem

Configuration

Create a .pgit file in the root directory that contains your repos:

github:
  your-username:
    repo-one:
    repo-two:
  some-org:
    their-repo: {remote: "some-org/their-repo"}

gitlab:
  your-namespace/group:
    private-repo:
    another-repo:

pgit discovers this file by walking up from the current directory — so running pgit status anywhere inside your repos root just works.

Remote overrides

If a repo is cloned to a local path that differs from its remote path, use the remote key:

github:
  my-local-name:
    project: {remote: "upstream-org/project"}

push modes

pgit push                # prompt for a message per repo (default)
pgit push --all          # one message for all dirty repos
pgit push --wip          # auto-commit with "WIP <timestamp>"

repos — drift detection

pgit repos compares what's actually on disk against your .pgit config and reports:

  • Remote mismatch — repo is at the right path but the git remote differs (e.g. SSH vs HTTPS)
  • Wrong location — remote is tracked in .pgit but cloned to a different directory
  • Untracked — repo on disk not referenced in .pgit at all
  • Missing — in .pgit but not yet cloned (run pgit sync)

It then offers to update .pgit or rename directories interactively.

Migrating from repos.yaml

If you were using the sync.sh predecessor, rename your repos.yaml to .pgit — the format is identical.

Requirements

  • Python 3.8+
  • git

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polygit-0.2.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polygit-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file polygit-0.2.0.tar.gz.

File metadata

  • Download URL: polygit-0.2.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.24.1","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for polygit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e08c83f07ea1c8a946d5f5ecb5ba4de6d943a9b86e1665da1aa64755ed7d61a1
MD5 86da83b81f1de33cba093fddfdadc4e4
BLAKE2b-256 d104aff3688d8fdd21d5b4a0f428ddc7f2f77b699f69314d1fd47fe98f135094

See more details on using hashes here.

File details

Details for the file polygit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: polygit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.24.1","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for polygit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14762fe227d2dea90cf6c495c38d42f7af9eae732b2b2a450b5a77cb49696d83
MD5 caede8f7afddb4d72af8467efb68f562
BLAKE2b-256 2f1415b0e4dce3cfe93d03558bd638bbb5ec37450dbe38cb59636917bedfd454

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page