Created
October 23, 2012 07:45
-
-
Save wowo/3937504 to your computer and use it in GitHub Desktop.
Post-update script to update other repo
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 | |
GIT_DIR=/home/wojciech.sznapka/htdocs/real.arch.sznapka.xsdev.pl/ | |
echo "*** Running $0" | |
echo "*** Resetting working copy of real.arch.sznapka.xsdev.pl" | |
(cd $GIT_DIR | |
git --git-dir=.git/ reset --hard HEAD > /dev/null) | |
echo "*** Updating real.arch.sznapka.xsdev.pl" | |
(cd $GIT_DIR | |
git --git-dir=.git/ pull origin master > /dev/null 2>&1) | |
echo "*** Resetting working copy of real.arch.sznapka.xsdev.pl" | |
(cd $GIT_DIR | |
git --git-dir=.git/ reset --hard HEAD > /dev/null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment