Skip to content

Instantly share code, notes, and snippets.

View craig-davis's full-sized avatar
👋

Craig Davis craig-davis

👋
View GitHub Profile
@craig-davis
craig-davis / README.md
Last active September 8, 2015 22:21 — forked from mbbx6spp/README.md
Git hooks to enforce pull request on master workflow

Sanity checking Git Hook for pre-commit

Checks that you are trying to push to master (or other key branches) from your local repository.

Installation

Download the above raw file (edit it as you please) and place inside your Git repository under: $GITDIR/hooks/pre-commit where $GITDIR is typically .git under your project working directory. Then make sure you make it executable: chmod +x .git/hooks/pre-commit