$ gem install legitRun legit with no options to see a list of commands and options.
- Add the following to
.git/hooks/pre-commitin the desired repository:
#! /bin/bash
legit catch-todos TODO- Make the hook executable (git will silently ignore your hook otherwise):
chmod +x .git/hooks/pre-commitEnable or disable catch-todos with the --enable and --disable options
legit catch-todos --disable # will not check todos until re-enabled
legit catch-todos --enable # sets it back to normal
Note: if you use a graphical git tool (such as SourceTree for OS X), you may need read the following:
RVM and similar tools do store executables in custom locations instead of the standard locations for executables such as /usr/bin. Since your .bash_profile (or similar) might not be executed by your GUI tool, you may need to create a symlink to legit in a location that is in the tool's default path. /usr/bin is usually included, so this should do:
sudo ln -s $(which legit) /usr/bin/legit # find where RVM is storing legit and add a symlink to it in /usr/bin- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request



