Created
September 6, 2012 09:31
-
-
Save navasvarela/3653789 to your computer and use it in GitHub Desktop.
Deploy using git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Post update hook to be added to the dir.git repository | |
# This hook pulls the master from the repo into the working web app git repo | |
echo | |
echo "Pulling changes into deployment repository" | |
echo | |
git --git-dir /path/to/webapp/dir/.git --work-tree /path/to/webapp/dir/ pull origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From http://sebduggan.com/blog/deploy-your-website-changes-using-git/ | |
# These are the commands that need to be executed to initialise the two repositories that are needed to deploy an app, the main repository and | |
# the one that holds the application | |
mkdir $1.git | |
cd $1.git | |
git init --bare | |
cd .. | |
git clone $1.git | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment