Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think there's value in git hooks, but pre-commit is the wrong hook. This belongs in a hook that runs on attempted push, not on commit.



formatting should definitely be in pre-commit though, otherwise you'll destroy diffs.


"pre-commit the tool" supports the pre-push hook (as well as the various other hooks).


Run the light ones on commit, the heavy ones on push.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: