Skip to main content

A tool to synchronise common files between Git repositories

Project description

[![Build Status](](
[![PyPI version](](

# Git Common Sync
_A tool to synchronise common files between Git repositories._

## Features
- Programmatically synchronises git repositories according to a specification.
- Supports synchronisation of:
- Files and directories.
- Directories managed by [git-subrepo](
- Content generated using templates and project specific values.
- Ansible support.

## How to use
### Prerequisites
- git >= 2.10.0
- git-subrepo >= 0.3.1
- python >= 3.6
- rsync >= 3.1.1

### Installation
#### Ansible Module
- gitcommonsync:
author_name: Ansible Synchroniser
key_file: /custom/id_rsa
- src: /example/
overwrite: false
- src: /example/directory/
dest: config
- src: /example/
dest: ci/before_scripts.d/
message: "Hello world"
overwrite: true
- src:
dest: subrepos/other-repository
branch: master
overwrite: true

## Development
### Setup
Install both library dependencies and the dependencies needed for testing:
$ pip install -q -r requirements.txt
$ pip install -q -r test_requirements.txt

### Testing
To run the tests and generate a coverage report with unittest:
If you wish to run the tests inside a Docker container (recommended), build `Docker.test`.

## Alternatives
- Powerful but complex Ruby based alternative from the Puppet community:

## License
[MIT license](LICENSE.txt).

Copyright (c) 2017 Genome Research Limited

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

gitcommonsync-2.0.0.tar.gz (15.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page