Skip to content

Instantly share code, notes, and snippets.

@keyle
Created December 14, 2024 11:13

Revisions

  1. keyle created this gist Dec 14, 2024.
    6 changes: 6 additions & 0 deletions notes.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    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/
    3 changes: 3 additions & 0 deletions pre-commit
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/bin/sh
    echo "" && git grep --cached --line-number "@nocheckin" && echo "@nocheckin found" && exit 1
    exit 0