Git-sync 1.8 README
This is set of scripts to synchronize git repositories for several servers
HOW IT WORKS
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:
$ git-sync.sh -ils
This is command to "fast" synchronization without initialization local repos:
$ git-sync.sh -ls
git-sync.sh is a main interface script for several service ones. These service scripts perform work of each synchronization operation:
git-init.sh - performs cloning of origin remote repos to local directory
git-pull.sh - performs fetch and pull from origin remote repo
git-push.sh - 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:
$ git-init.sh /srv/sync