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.3.1.tar.gz (24.9 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.3.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polygit-0.3.1.tar.gz
  • Upload date:
  • Size: 24.9 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.3.1.tar.gz
Algorithm Hash digest
SHA256 f4b24c7c00f89961ec70f9d0fd1a1b03b9d06c4dfc2b423999ab41774b70fcf1
MD5 ca63bc319cdc8662494b9b5359ede4b4
BLAKE2b-256 cc85a646d74be9992324e23af6c03ded0f0688bcb13b25eb9fbf685155bf9bbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: polygit-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64c437285c6ee3373f3075f56e06b7b2083235191af7686c7dd03390ab9cd444
MD5 abd62aa25bba3b7ff1ec4a638d73dd20
BLAKE2b-256 435f933142d42389fbb79b1ebe6ca26ba063b4f5f31beb993499694c164a6f2c

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