Skip to content

Instantly share code, notes, and snippets.

@cbrunsdon
Created February 19, 2014 23:10
Show Gist options
  • Save cbrunsdon/9103587 to your computer and use it in GitHub Desktop.
Save cbrunsdon/9103587 to your computer and use it in GitHub Desktop.
~/.git_template/hooks/pre-commit
#!/bin/sh
set -e
[ ! -f Gemfile ] || git diff --exit-code --cached -- Gemfile >/dev/null || bundle check
exec "$(git --exec-path)/../../share/git-core/templates/hooks/pre-commit.sample"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment