Question

Is there a way to configure Git to give me an alert before or after I commit locally? For example, after I commit (ideally before), I get some kind of output like "Did you double check settings.py?". Alternatively, can I script this using bash? I've been looking around, but I haven't found much on the topic.. Thanks in advance!

Was it helpful?

Solution

The pre-commit hook should give you the opportunity to do what you want.

See http://www.git-scm.com/book/en/Customizing-Git-Git-Hook. The example scripts contain good documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top