Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I change when the commit message length warning appears?

enter image description here

Is there a way to get VS Code to automatically adjust the commit line message to avoid this warning. Otherwise I need to pay attention and press enter when the message appears, every time I write a commit message.

I would want VS Code to automatically press enter for me , I really don’t even understand why the warning shows up, never had that issue when using SourceTree UI for example

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you want to just change the threshold for showing the warning, use "git.inputValidationSubjectLength": <N> for the subject line (the first line) and "git.inputValidationLength": <N> for subsequent lines.

If you want to turn the validation off entirely, use "git.inputValidation": "off".

Put these settings in your settings.json file.

The worst that can happen if you have long subject lines for your commit messages is that it will be hard for you and others to quickly know what a commit has changed. Nothing will explode, but you’ll probably thank yourself in the future if you make an effort to be concise. See also: Git Commit Messages: 50/72 Formatting.

See also the git docs on the commit command:

Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading