Skip to main content

Mirror your private repo commit messages to a public GitHub repo so your green squares survive.

Project description

commit-mirror

Mirror your private repo commit messages to a public GitHub repo, so your green contribution squares survive when you leave an org.

When you're removed from a private organization, GitHub wipes those contributions from your graph. Your code stays in their repo, but you lose all the green squares. This tool runs locally, reads your git log, and copies only commit messages (no code, no diffs) to a public repo you own, keeping your graph alive.


Install

pip install commit-mirror

Setup (once)

Step 1 — Create a public GitHub repo called activity-log (or any name) and clone it:

git clone https://github.com/YOUR_USERNAME/activity-log ~/activity-log

Step 2 — Run the setup wizard:

commit-mirror --setup

It will ask for:

  • Your git author email
  • The path to your cloned activity-log repo
  • The folder(s) that contain your private repos (cloned locally)

Usage

commit-mirror                   # run normally
commit-mirror --dry-run         # preview without pushing
commit-mirror --dry-run --days 30   # look back 30 days
commit-mirror --config          # show your current config

Automate it (run daily)

macOS / Linux — cron:

crontab -e
# Add:
0 23 * * * commit-mirror >> ~/mirror.log 2>&1

Windows — Task Scheduler:

Action: commit-mirror
Trigger: Daily at 11 PM

What gets mirrored

✅ Mirrored ❌ Never mirrored
First line of commit message Code / diffs
Commit timestamp (UTC) File names
Repo name Branch names
Other authors' commits

The output in your public repo looks like:

## 2025-06-15
- `10:32 UTC` **[frontend-app]** fix null pointer in user auth flow
- `14:17 UTC` **[backend-api]** add pagination to /orders endpoint

Config file

Stored at ~/.commit-mirror/config.json. Edit manually or re-run --setup.


License

MIT License

Copyright (c) 2026 Rashmin Chaudhari

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

commit_mirror-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

commit_mirror-0.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file commit_mirror-0.1.1.tar.gz.

File metadata

  • Download URL: commit_mirror-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for commit_mirror-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9c0b1e09495420532927487b2194377887a32c5f323cd24a9061b0bd670f3c8
MD5 5abf6f66e06427c6152a8709996fdda4
BLAKE2b-256 1550582e8d6c995ac889db4299645f949d1b35e04fefc73aa835845451562c5e

See more details on using hashes here.

File details

Details for the file commit_mirror-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: commit_mirror-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for commit_mirror-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f771f0ceffb57306768b78a7b76d4e847e688814b354d37dd599df8338557ca4
MD5 1c234e1aa4c3552ce217b80550531250
BLAKE2b-256 c515e48a5e6cd44c2b65cdeeac70233621311ad40a6a32b9371b95a7a7a60d4c

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