Synchronise easily your local git repository between all your devices.
NOTE:
- This Makefile was build and use on Debian shell.
- Don't forget to configure variable on top of the file.
- Hidden file
.dsynctime
was create into directory destination- Pull / Push command use file
.dsynctime
for no erase local file.
sshUser := user
sshKey := /home/user/.ssh/id_dsa
sshRemote := domain.tld
PathRemoteBase := /where/you/want
Clone permit to clone repository and create file .dsynctime
at same time.
The following command will be create persistent folder /github/pierozi/dsync
$ make clone/github/pierozi/dsync repo=https://github.com/Pierozi/dsync.git
Push permit to rsync local directory to remote server.
$ make push/github/pierozi/dsync
Pull permit to rsync remote directory to local.
$ make pull/github/pierozi/dsync
Tinfo show the three timer : Local | Push local | Push distant.
$ make tinfo/github/pierozi/dsync
Locale time : 12/01/2015 16:51:14
Push time : 09/09/2014 01:33:17
Distant time : 09/09/2014 01:33:17
Make a file into your root project sync and touch file named .dsyncignore
the syntax are similar to an .gitignore
it's useful for ignore some heavy files you don't want push to your server...
this example build an dsyncignore file for ignore Packer & Vagrant resources
$ echo -e "*.box\n*-vbox\n.vagrant\npacker_cache" > namespace/myProject/.dsyncignore
$ make push/namespace/myProject