Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easily recover comment created within editor #40

Open
jesse-mm opened this issue Aug 17, 2023 · 1 comment
Open

Easily recover comment created within editor #40

jesse-mm opened this issue Aug 17, 2023 · 1 comment

Comments

@jesse-mm
Copy link
Contributor

I was using git commit and my editor vim to add next to the subject line a body. After saving the commit message commit-lint rules declined the message.

Is there a way to retrieve the previous message easily and amend changes to make it pass the commit lint rules ?

@leroykorterink
Copy link
Contributor

We could set the git template in the git configuration but that's not what that property is meant for. git commit clears the COMMIT_EDITMSG file, the prepare-commit-msg hook could read out the message from a file (that is otherwise lose because of a precommit error) from a file and insert it in the COMMIT_EDITMSG file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants