Keep all your git forks up to date with the remote default branch.
Project description
If you manage more than a couple git forks, keeping them up to date with their remote default branch can be a pain. Forks Sync lets you avoid all the fuss by concurrently cloning each of your projects locally, adding the remote upstream, fetching new changes, rebasing your local default branch against the remote default branch, and force pushing
to your repo's origin default branch - keeping all your forks up to date with the original repo.
By default, Forks Sync will save all your forks to ~/forks-sync
where you can also find logs for this tool.
NOTE: Before proceeding, know that this tool will forcefully update the default branch of your fork to match the upstream default branch.
Install
# Install tool
pip3 install forks-sync
# Install locally
make install
Usage
Usage:
forks-sync --token 123...
Options:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
Provide your GitHub token to authenticate with the GitHub API.
-f, --force Pass this flag to force push changes to forked repos, otherwise the tool will run in "dry mode".
-th THREADS, --threads THREADS
The number of threads to run.
-to TIMEOUT, --timeout TIMEOUT
The number of seconds before a git operation times out.
-l LOCATION, --location LOCATION
The location where you want your forks and logs to be stored.
Automating SSH Passphrase Prompt (Recommended)
To allow the script to run continuosly without requiring your SSH passphrase, you'll need to add your passphrase to the SSH agent. NOTE: Your SSH passphrase will be unloaded upon logout.
# This assumes you've saved your SSH keys to the default location
ssh-add
Development
# Get a comprehensive list of development tools
make help
# Run the tool locally
venv/bin/python forks_sync/sync.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for forks_sync-3.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052786655cd503c40f8b8a0ea996b521b0d3395625a30e8916ab7b0e82af145e |
|
MD5 | 3d6ffae6b9473785f43d327ff7e46b5d |
|
BLAKE2b-256 | ef94ca0c76e307d34b273bd6fde98b1f97c7dacc12cb63f7e7fb6956704811cf |