Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 27, 2022
    • Case Nelson's avatar
      Add git pre-commit hook to catch `nocommit` lines (#22096) · 8108f0aa
      Case Nelson authored
      Sometimes you’ll make a change to some code and not want to commit it. You probably add a comment to the code and hope you’ll either see the comment in the diff before committing or just remember not to check in the change. If you’ve ever done this you’ve probably also committed something you didn’t mean to commit. I know I have.
      
      Below is a git pre-commit hook that searches for the text `nocommit` and if found rejects the commit. With it you can stick `nocommit` in a comment next to the change you don’t want committed and know that it won’t be committed.
      
      You can maintain a list of personal forbidden words by exporting
      `NOCOMMIT_RE` e.g:
      `export NOCOMMIT_RE="spy|tap>|curse word"`
      Unverified
      8108f0aa
  2. Apr 04, 2021
Loading