Skip to content

Instantly share code, notes, and snippets.

@bergantine
Forked from robhudson/post-merge
Created September 18, 2012 18:55
Show Gist options
  • Save bergantine/3745056 to your computer and use it in GitHub Desktop.
Save bergantine/3745056 to your computer and use it in GitHub Desktop.
post-merge Git hook to look for changes to requirements. #bash #git #hook #pip #python
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment