0.7.1 • Published 4 years ago

git-hooks-wrapper v0.7.1

Weekly downloads
33
License
MIT
Repository
github
Last release
4 years ago

git-hooks-wrapper

Make usage of git hooks easy in project of any programming language and any platform. Works on Windows with git bash.

Installation

LanguageInstallCommand Execution
Nodenpm install git-hooks-wrappernpx git-hooks-wrapper
PythonTBD pypi pip
PHPTBD Composer PEAR Packagist
...

Basic Usage

After install automatically runs init wrapping $PWD/git-hooks folder by default. Folder can be changed by running pattern

$ $ghw init $hooksDirecotory

This project uses itself so use ./git-hooks as examples

In addition to init and hooks there are several useful scripts in ./utils that can be run with pattern

$ $ghw $command $@

Wrappers Functionality

pre-commit

Removes untracked files and recovers them afterwards - ensures that test are running without side-effects. If files was changed (untracked appeared) exists with error.

Commands list

$ $ghw
# SCRIPTS:
- init
- test
# HOOKS:
- applypatch-msg
- commit-msg
- fsmonitor-watchman
- p4-pre-submit
- post-applypatch
- post-checkout
- post-commit
- post-index-change
- post-merge
- post-receive
- post-rewrite
- post-update
- pre-applypatch
- pre-auto-gc
- pre-commit
- pre-merge-commit
- prepare-commit-msg
- pre-push
- pre-rebase
- pre-receive
- push-to-checkout
- sendemail-validate
- update
# UTILS:
- forceupdate
- forceupdate_submodules
- getbranch
- getRefsBranch
- getRemote
- semver_inc
- stash_untracked
- stats

TBD

prepare-commit-msg

Add argument with stats overview

commit-msg

Add arguments with message uniqueness and open issue existence

Further reading

About hooks

https://git-scm.com/docs/githooks

https://www.atlassian.com/git/tutorials/git-hooks

pre-commit

https://codeinthehole.com/tips/tips-for-using-a-git-pre-commit-hook/

0.7.1

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.1-0

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago