Create a Local Repository - crazedsanity/WebCron GitHub Wiki
If you have a test environment and want to be able to test a new version of Web Cron, you may want to build a local clone of the repository. You can then clone (or use it) in the test environment, and production can pull from the local clone instead of the Git Hub repository. This ensures your local copy is always stable and tested.
Assumptions:
- you're using a Linux server
- there's a test environment
- the servers all have the SSH server (in Debian/Ubuntu, it's
openssh-server
) installed
Initial Creation
Find a location where the stable version will exist. Cd into that directory, and run this command:
cd /usr/local/git
git clone [email protected]:crazedsanity/WebCron.git webcron
Now you've got a clone. You can do the same thing in a test environment and do as much testing as necessary to ensure it works. Once you're ready, update that main clone. On your production machines, instead of pulling from the main Git Hub repository, you'll use that local clone.
To clone on production:
cd /var/www/html
git clone [email protected]:/usr/local/git/webcron
From that point forward, pulls will come from repo.local
. Make sure that's the "stable" version, and you're good to go. To pull the most recent version:
cd /var/www/html/webcron
git pull
BIG SCARY WARNING
I'm not sure how this works with Git submodules. If the submodules still get pulled from the main repository, you may get the illusion of stability where really there's much less (because the underlying libraries get updated outside of the main library).