Skip to content

Instantly share code, notes, and snippets.

@hugowetterberg
Created February 20, 2009 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hugowetterberg/67380 to your computer and use it in GitHub Desktop.
Save hugowetterberg/67380 to your computer and use it in GitHub Desktop.
Post-receive-hook that updates the working dir and updates submodules
#!/bin/sh
repo="`pwd`"
export GIT_DIR="$repo"
wd="`dirname $repo`"
echo "$repo"
echo "$wd"
cd "$wd"
git merge master
git submodule init
git submodule update
cd "$repo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment