Skip to content

Instantly share code, notes, and snippets.

@stephencroberts
Created November 25, 2013 03:01
Show Gist options
  • Save stephencroberts/7635615 to your computer and use it in GitHub Desktop.
Save stephencroberts/7635615 to your computer and use it in GitHub Desktop.
Updates the local database to reflect which branch was checked out
#!/bin/sh
# If checking out a branch
if [ $3 -eq 1 ]; then
# Get the new branch
branch=`git rev-parse --abbrev-ref HEAD`
# Run dev site setup
php -f setup.php "$branch"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment