gem install refined-refinements
git clone https://gist.github.com/40da4532046d65318f860bff115db603.git
cp 40da4532046d65318f860bff115db603/pre-commit 40da4532046d65318f860bff115db603/post-commit your_repo/.git/hooks
- Fail if trying to commit to the master branch.
- Run
rubocop --auto-correct
on the changed files. - Automatically push to
origin
, even if the branch is not there yet. - Sets the upstream, so
git pull -r
will work as expected.
- Disable for one commit with
git commit --no-verify
.