Skip to content

Instantly share code, notes, and snippets.

@sroccaserra
Created October 7, 2014 09:09
Show Gist options
  • Save sroccaserra/2fc95dc62d20bb58d67f to your computer and use it in GitHub Desktop.
Save sroccaserra/2fc95dc62d20bb58d67f to your computer and use it in GitHub Desktop.
Watch `package.json` updates and run npm install (save as `.git/hooks/post-merge`)
git diff --pretty="format:" --name-only "HEAD@{1}" | grep "^package.json$" && npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment