Skip to content

Instantly share code, notes, and snippets.

@atfzl
Last active September 3, 2016 10:45
Show Gist options
  • Save atfzl/e1ba80c3b4148c04b7827e0410011d0c to your computer and use it in GitHub Desktop.
Save atfzl/e1ba80c3b4148c04b7827e0410011d0c to your computer and use it in GitHub Desktop.
Post Commit setup steps
#!/bin/bash
# directory for storing branch specific gitignore files
mkdir .gitignores
# empty file for production branch
touch .gitignores/production
# ignore build on any other branch
echo "build" >> .gitignores/default
# install git-hooks
npm i --save-dev git-hooks
mkdir -p .githooks/post-checkout
# this file will run post checkout
touch .githooks/post-checkout/index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment