Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
GitSync ======= GitSync aims at providing an automated git-based synchronization system. It watches the content of one or more git repository and add/remove/commit the changes which are made there. This way it kind of provide a similar service then dropbox or sparkleshare but: - in python (no mono-pile to install) - in cron or using file system watch (set your frequency as desired or get the changes in in real time) - in git (get real track changes). INSTALL ======= == Dependencies * Python2 (tested on 2.6.6 & 2.7.5) * pygit2 (tested with 0.20.3) * watchdog (tested with 0.7.1) == Install the program === Link from git The easiest way is just to clone the git repo and make a link from ~/bin or /usr/local/bin to the gitsync.py file. == Via the setup.py Clone the source and install them simply using python setup.py install. === Via rpm. Make a tarball of the project and run rpmbuild -ts <tarball>. Install the resulting RPM via yum install <path/to/rpm>. == Configure the program You will need to specify in "~/.config/gitsync" the directories that you want gitsync to watch (that will be the work_dir option). Each directory should contain a git repository (cloned from a remote origin or just local) and will be separated by a comma ',' in the list. ei: work_dir = /home/user/Notes, /home/user/Articles, /home/user/Scripts Then you can run gitsync as daemon using /usr/local/bin/gitsync.py --daemon & This will watch for changes on the filesystem and add/remove the files from the git repositories as they are added/updated/removed. You may want to add --verbose to get some output and eventually redirect them to a log file. It is now up to you ;-) My workflow here would be something like: 1) setup gitolite 2) create the repo in gitolite 3) clone it 4) create the first commit by hand and push it to the remote repo (this will create the master branch, needed by gitsync) 5) setup gitsync on machine A pointing to the clone checked-out 6) repeat step 4 on the other machines 7) enjoy* ;-) ==================================================================== /!\ Please note that if one file is changed on two systems at once, there will likely be a conflict in git. If gitsync cannot push to the remote repo, it will say so and that will be up to you to fix the git repo. ==================================================================== * This program is bug free of course but may contain some random features if you face one of them and can reproduce it, please let us know. We will decide wether to keep it or not ;-)