Sending a minimal set of changes using rsync
Wednesday, October 6, 2010 12:01:31 PM
I had a small set of changes in a local git repository; I wanted to send it to an external repository where a number of nodes could fetch it, but introducing only the smallest amount of change. This command did the trick:rsync -zav --delete --exclude .git \ --no-owner --no-group \ --checksum --omit-dir-times \ . \ root@somewhere:/path







Andreaandreambu # Wednesday, October 6, 2010 1:59:23 PM
Couldn't you push [1]?
A.
[1] http://stackoverflow.com/questions/279169/deploy-php-using-git
Marco Marongiumarcomarongiu # Wednesday, October 6, 2010 8:18:05 PM
The main one: there was just a local change that I wanted to test: if it didn't work, I'd just abort it.
The change I wanted to check was deployed on a server and then propagated through a hierarchy of distribution servers. In normal conditions it is the git repository that feeds the main DS; this time I fed it from my workstation. If anything went wrong, re-feeding it from git and redistributing the files would reset everything to the previous state.
Finally, the git repository and the DS must be on different machines for reasons that I won't discuss here