Skip to content

Instantly share code, notes, and snippets.

@z720
Created November 25, 2014 09:41
Show Gist options
  • Save z720/9ea4a54554b57678483e to your computer and use it in GitHub Desktop.
Save z720/9ea4a54554b57678483e to your computer and use it in GitHub Desktop.
Post Receive hook for working copy update
#!/bin/sh
# merge the shared branch
if [ -n "$(git status --porcelain)" ]; then
echo "Working copy not cleaned, please update manually";
git status
else
git merge shared
git clean -f -d
git log --pretty=format:'%h -%d %s <%an> (%ci)' --abbrev-commit > .changelog
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment