Skip to content

Instantly share code, notes, and snippets.

@willmorgan
Forked from jamesmusgrave/pre-commit.sample
Created January 17, 2014 15:07
Show Gist options
  • Save willmorgan/8474916 to your computer and use it in GitHub Desktop.
Save willmorgan/8474916 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Pre-commit file needs to be executable so first
# chmod +x .git/hooks/pre-commit
# Fix your grunt path
PATH="/usr/local/bin:$PATH"
# Runs grunt default
echo "Running Grunt..."
grunt
# Adds changed files to the commit
git add "js/app.min.js"
git add "css/global.css"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment