Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > ... > As mentioned before, I don't advise using git to deploy changed files. > It will change them in the wrong order and creates windows when they're > not present. Perhaps a procedure like the following can work? > > cd /root; (umask 077 && mkdir tmp); cd tmp > git clone /etc/interesting-subdir >... > # deploy. > rsync -a --exclude='.git' /root/tmp/interesting-subdir/ . > git reset jrn/proposed > git diff; # should show no changes. How does this "rsync" solve "the wrong order" and "creates windows" problems? It will update the paths in the order rsync happens to discover and there is a wondow between the time the first path is updated and the whole directory gets finally in sync. If you truly want an atomicity, you can make /etc/interesting-subdir a symbolic link that points to either interesting-subdir-{0,1}, do the above procedure of yours against interesting-subdir-0 (or 1) that is currently not pointed by the symbolic link, and when everything in that one is Ok, atomically switch the symbolic link to point at it. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html