Skip to content

Instantly share code, notes, and snippets.

@thetarnav
Created January 27, 2024 12:03
Show Gist options
  • Select an option

  • Save thetarnav/8214c0dfa5f6fe7891a7c4f668edffa0 to your computer and use it in GitHub Desktop.

Select an option

Save thetarnav/8214c0dfa5f6fe7891a7c4f668edffa0 to your computer and use it in GitHub Desktop.
nocheckin

John Blow has a commit hook that prevents him from commiting nocheckin

hook

echo "" && git grep --cached --line-number "nocheckin" && echo "FOUND nocheckin" && exit 1
exit 0

to add it

echo 'echo "" && git grep --cached --line-number "nocheckin" && echo "FOUND nocheckin" && exit 1
exit 0' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Resource: https://www.reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment