You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm all for good commit messages, and in fact consider myself a champion of them. But if I write a commit message that commitlint doesn't like, Husky gives me an error and then throws away my commit message, with no guidance about how to proceed, other than the validation errors. This is extremely frustrating!
As someone who writes detailed, useful commit messages using an editor, it's a very offputting experience (and very much against the spirit of git) to write a nice useful paragraph in the commit body, and then have it vanish into the ether because I didn't prefix my subject correctly or some such. This is doubly so because this is most likely to happen to new contributors who are not deeply familiar with git and don't know where their commit message went!
This may better be filed as an upstream bug with Husky (which I also plan to do also), but if a project is implementing aggressive commit linting around particular commit formatting (which, properly implemented, is fine!), I think it's incumbent on them to do it in a way that isn't destructive. I'm all for enforcing a correct style, just not for throwing away someone's commit message because they made a typo.
After some research I found that the commit message isn't actually gone, and if you don't make another commit you can recover it with some cumbersome commands, but I doubt most git users are aware it is even a possibility, much less how to do it. This project should offer a better way.
What do you expect to happen?
I wanted to be able to edit my paragraph-long commit message to conform to the guidelines
What is actually happening?
My commit message was discarded with no apparent way to recover it
Would you be willing to resolve this issue by submitting a Pull Request?
Did it, #13953 - it ain't pretty, but it's better than what we've got.
The text was updated successfully, but these errors were encountered:
Thank you :) Let us know if husky ever implements it upstream too
Will do! I still need to figure out where best some mitigation might fit upstream - it may be better placed with commitlint - but I do plan to see what I can get in place up there. Thanks for the quick merge on this end in the meantime!
Issue Creation Checklist
[x] I have read the contribution guidelines
Bug Description
I'm all for good commit messages, and in fact consider myself a champion of them. But if I write a commit message that
commitlint
doesn't like, Husky gives me an error and then throws away my commit message, with no guidance about how to proceed, other than the validation errors. This is extremely frustrating!As someone who writes detailed, useful commit messages using an editor, it's a very offputting experience (and very much against the spirit of git) to write a nice useful paragraph in the commit body, and then have it vanish into the ether because I didn't prefix my subject correctly or some such. This is doubly so because this is most likely to happen to new contributors who are not deeply familiar with git and don't know where their commit message went!
This may better be filed as an upstream bug with Husky (which I also plan to do also), but if a project is implementing aggressive commit linting around particular commit formatting (which, properly implemented, is fine!), I think it's incumbent on them to do it in a way that isn't destructive. I'm all for enforcing a correct style, just not for throwing away someone's commit message because they made a typo.
After some research I found that the commit message isn't actually gone, and if you don't make another commit you can recover it with some cumbersome commands, but I doubt most git users are aware it is even a possibility, much less how to do it. This project should offer a better way.
What do you expect to happen?
I wanted to be able to edit my paragraph-long commit message to conform to the guidelines
What is actually happening?
My commit message was discarded with no apparent way to recover it
Would you be willing to resolve this issue by submitting a Pull Request?
Did it, #13953 - it ain't pretty, but it's better than what we've got.
The text was updated successfully, but these errors were encountered: