Created: 2012-03-21 10:28
Updated: 2013-10-12 02:39
License: agpl-3.0


Git-sync 1.8 README


This is set of scripts to synchronize git repositories for several servers


This scripts perform next steps:

  • Clone the original remote repository of specified projects to local direcotory.

  • Add custom remote repositories for each project.

  • Update the local repositories master branch.

  • Push the local repositories master branch to custom remote repositories.


This application can work without installation. But you can build deb package with it:

$ make deb

Also you can install git-sync to your system from sources:

$ make install


Specify next data to configure your repositories synchronization:

  • Set project names to synchronize in conf/projects.conf file.

  • Set connection strings (hostnames with username and path) for git servers in conf/servers.conf file.

  • Set the original git primary server connection string (PRIMARY_ORIGIN_REPO) in conf/git-sync.conf file.

  • Set the original git secondary server connection string (SECONDARY_ORIGIN_REPO) in conf/git-sync.conf file. It will be used if target project is unavailable from primary repo.

  • Set local directory for temporary files (PROJECTS_DIR) in conf/git-sync.conf file.

  • Set path of ssh keys files (SSH_KEY_PATH) in conf/git-sync.conf file.

  • Set ssh keys file names in conf/keys.conf file.


Type this command to perform all synchronization operations:

$ -ils

This is command to "fast" synchronization without initialization local repos:

$ -ls is a main interface script for several service ones. These service scripts perform work of each synchronization operation: - performs cloning of origin remote repos to local directory - performs fetch and pull from origin remote repo - performs push master branch to all custom remote repos

You can use these manually. Just specify for each script argument with projects directory path. For example:

$ /srv/sync

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more