Reputation: 9011
I am relatively new to using Git and I was wondering if there was a nifty way to prevent git commit
from running if it detects any //TODO
statements in the changes that you are attempting to commit.
IntelliJ used to detect this for me when I did SVN commits, but I would like to know the best way to accomplish this on the command line.
Upvotes: 1
Views: 962
Reputation: 75589
You want to write and install a pre-commit hook which looks for // TODO
in changes and returns a non-zero exit status if it finds that string.
Upvotes: 3