A tool to mirror repositories from single source repo to multiple source repositories.
For times when you want to have a replicas of your git repositories. Either from private hosted Gogs to Bitbucket, Github to Private Server, Phabriator Diffusion to Github, Gitlab to Bitbucket, Github to Gitlab etc., whatever the reason you have. This tool has everything you want to mirror any number of repositories.
Starting from one idea to whole open source project. One day I was thinking of having a backup of all my repos hosted gogs. Gogs provides backup solution (a ZIP of all repos and other data) but that's not what I wanted. So I wrote a small script to get a clone from one source and push it to other destination repo. And then added some fancy stuff and put on a Lumen wrapper.
- Clone this repo.
- Copy
config.template.json
toconfig.json
- Fill all values in
config.json
- Run command
php artisan git_replicator:replicate
- Check for valid json.
- Don't Add remote URL if already exists.
- Write
config.json
validator. - Add debug mode.
- Add Symfony's
Lockable
trait to lock command. - Support cloning and pushing via SSH.
- Support git LFS.
- Keep logs of all the runs.
- Create a phar file.
- Remove unwanted elements from Lumen.
- Write unit tests.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D