Created
December 14, 2024 11:13
-
-
Save keyle/497208466ac37f4742d524d1a29d7d02 to your computer and use it in GitHub Desktop.
@nocheckin with Git
This file contains hidden or 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
in the repo, create the file: | |
.git/hooks/pre-commit | |
don't forget to chmod +x pre-commit as it needs to be executable | |
source: https://www.reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/ |
This file contains hidden or 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
#!/bin/sh | |
echo "" && git grep --cached --line-number "@nocheckin" && echo "@nocheckin found" && exit 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment