Skip to content

clankill3r/NOCHECKIN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

@NOCHECKIN

A pre-commit hook that prevents from commiting if the text nocheckin is present in any of the staged files.

Special thanks to ElpieKay who did all the hard work. Also thanks to jthill for a slight improvement.

The original question and source can be found here: https://stackoverflow.com/a/59133674/1022707

The reason I make a repository out of this is so people can watch it and will be notified if anyone will post an issue. Since so far this has not been heavily tested.

Changelog

V5:
- @ prefix no longer required, and search is case insensitive.
V4:
- added "--diff-filter=d" to fix problem with deleted files.
V3:
- All filenames containing @NOCHECKIN are listed now instead of only the first one.

V2:
- Not a single file is commited now when @NOCHECKIN is present (before it would commit the files that did not have an @NOCHECKIN).

V1:
- initial

Usage

This pre-commit file should be placed inside .git/hooks.

Make sure the pre-commit file has the permisions to be executed! E.g. chmod +x pre-commit on OSX.

Notes

For those interested, it also works with Fork.

About

Test for git pre-commit hook for using @NOCHECKIN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages