Last active
March 29, 2016 18:00
-
-
Save TSchuermans/4a3e9a8e06afa0d990c78a559e7fd16b to your computer and use it in GitHub Desktop.
init-commit-msg.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If the project does not have a repository yet, initialise it. | |
git init | |
# Rename the sample hook file | |
mv ./.git/hooks/commit-msg.sample ./.git/hooks/commit-msg | |
# Make the hook file executable | |
chmod +x ./.git/hooks/commit-msg | |
# Edit the hook file with your editor (atom, vi, sublime, ...) | |
atom ./.git/hooks/commit-msg | |
# Paste the content of | |
# https://gist.github.com/TSchuermans/eecf5c4c23aa96689445bb9f6103d75c | |
# into your editor and modify the pattern. | |
# Save the hook file. | |
# Done! your commits will now be validated each time | |
# (unless you use the --no-verify option) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment