My Opera is closing 3rd of March

Cronache di Sarvegia

...because every new challenge hides an opportunity

Sending a minimal set of changes using rsync

, ,

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

Cronache di Sarvegia: dal 24 Agosto al 3 OttobreL'ambigua pausa caffè degli svedesi...

Comments

Andreaandreambu Wednesday, October 6, 2010 1:59:23 PM

Why are you using rsync while you're already using git?
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

For a number of combined reasons smile

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 wink