A collection of git hooks and aliases to be pulled into a global location for git to reference
The repository is quite old and I don't use the hooks anymore. Though the aliases are useful still.
The primary ones are:
git ls
- great for checking the commit historygit undo
- great to rollback to go back in timegit amend
- for those times you make a spelling mistakegit alias
- to see all aliases
git config --global include.path '/path/to/git-templates/.gitalias
As stated previously, not using these. Git clients have improved much since the early days.
$ git commit -m "Some message"
Reviewing commit integrity (pre-commit)
(bypass with '--no-verify')
✘ Committing to 'refs/heads/master'
✔ Small commit (0 files)
✔ No large files
✔ No merge markers
✔ Allowed mime types
1 warning, continue (y/n)? y
Time taken: 3s
If applied this commit will
Some message
Reviewing commit message (commit-msg)
(bypass with '--no-verify')
✘ Subject does not start with and approved word
(use <Fix, Change, Add, Remove, Deprecate, Secure, Document, Maintain, Release>)
✘ Summary (12 characters) is shorter than 16 characters
✓ Summary ends with a period
✓ No body
2 warnings, continue (y/n)? n
Commit denied: 3s
# install the hooks, new in Git version 2.9
git config --global core.hookspath '/path/to/git-templates/hooks'
git config --global --unset core.hookspath
$ cd /path/to/git-templates
$ git pull
git config --global core.editor notepad
All notable changes to this project will be documented in CHANGELOG. The format is based on Keep a Changelog and adheres to Semantic Versioning.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details
The hooks have been adapted from Sitebase/git-hooks.