logoalt Hacker News

seniorsassycattoday at 1:28 AM1 replyview on HN

What if I've already fixed the format issue (but not staged it). The pre-commit hook will pass, but it's not doing what the author intended (preventing unformated code from being committed).

What if I've only staged one part of a file, but the pre-commit hook fails on the unstaged portions, which should be fine since I'm not commiting or pushing those changes.


Replies

a_t48today at 6:38 AM

You can stash it or `git commit -n`. Perfect is the enemy of good enough.