Skip to content

Instantly share code, notes, and snippets.

@robhudson
Created September 18, 2012 16:41
Show Gist options
  • Save robhudson/3744199 to your computer and use it in GitHub Desktop.
Save robhudson/3744199 to your computer and use it in GitHub Desktop.
git post-merge hook to look for changes to requirements
#!/bin/sh
if [ $(git diff HEAD@{1} HEAD --name-only | grep 'requirements/' -c) -ne 0 ]
then
$VIRTUAL_ENV/bin/pip install -r requirements/dev.txt
fi
@acdha
Copy link

acdha commented Sep 18, 2012

I've actually toyed with doing something simpler: just run pip install -r (or now piplint) regularly to try to catch any manual installs I might have done, particularly across major feature branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment