Ivor O’Connor

December 18, 2012

Synchronizing Multiple Websites Simultaneously With Git

Filed under: Uncategorized — ioconnor @ 5:28 pm

I want to run on multiple sites for redundancy and scalability while I do my development work locally. The script I added a couple of days ago will initialize the local area and one remote. This script here is used to add additional remote sites. Again it is assumed you have already setup ssh properly so no passwords or port numbers need be specified. (See my past posts if you don’t know how to handle non standard port numbers or setup automatic logins.) Once finished you can add an alias like “alias pushall=’for i in `git remote`; do git push $i; done;'” or update the .bashrc file with the code shown in the script itself.

gitAddRemote

Advertisements

Create a free website or blog at WordPress.com.