Skip to content

Instantly share code, notes, and snippets.

@wowo
Created October 23, 2012 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wowo/3937504 to your computer and use it in GitHub Desktop.
Save wowo/3937504 to your computer and use it in GitHub Desktop.
Post-update script to update other repo
#!/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