Skip to content

Instantly share code, notes, and snippets.

@keyle
Created December 14, 2024 11:13
Show Gist options
  • Save keyle/497208466ac37f4742d524d1a29d7d02 to your computer and use it in GitHub Desktop.
Save keyle/497208466ac37f4742d524d1a29d7d02 to your computer and use it in GitHub Desktop.
@nocheckin with Git
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/
#!/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