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

I don't understand commit hooks - they're like binding a macro to the MS Word save button to make it conditional.


> like binding a macro to the MS Word save button to make it conditional

You have no idea how much I'd love that feature. Inasmuch as "save" is still a thing anyway. I don't miss explicit saves in IDEA, I see commit as the "real" save operation now, and I don't mind being able to hook that in an IDE-independent way.

I think the UX of git hooks has been sub-par for sure, but tools like the confusingly named pre-commit are helping there.


Because if you haven’t auto-formatted, lined, etc. then it’s a very easy way to do that so you don’t waste time watching CI fail for something stupid like trailing comma placement.

I don’t want to think about formatting, I just want everything to be consistent. A pre commit hook can run those tools for me, and if any changes occurred, it can add them to the commit.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: