question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git commits should include an empty line between title and description

See original GitHub issue

Hello @carloscuesta!

Git commits should have an empty line between the title and the description but currently, there’s none:

📝 Add Readme
This readme bla bla #1

should look like

📝 Add Readme

This readme bla bla #1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
tom-rbcommented, Dec 15, 2017

I know it’s a dated discussion, but google brought me here when searching about the commit blank line. I’ve found in the documentation a reference to it

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.

1reaction
posvacommented, Mar 4, 2017

That blank line allows to clearly separate the title of the commit from the summary. I couldn’t find an official reference for this but it’s a some kind of standard. For instance when writing the commit with vim, it’ll automatically break every 80 characters and highlight the background in red the second line to tell you you shouldn’t write anything there. A project using this is the erlang repo. On Google there’re many posts saying that but I couldn’t find something from git. Maybe I read it on a book

On Sat, 4 Mar 2017, 11:09 Carlos Cuesta, notifications@github.com wrote:

What’s the point about having an empty line between the commit title and the description? @posva https://github.com/posva

I’m not sure but, I think that we don’t need a break line. With two or more -m option lines are concatenated as separate paragraphs.

git commit -m “Commit title” -m “Commit message”

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/carloscuesta/gitmoji-cli/issues/31#issuecomment-284141790, or mute the thread https://github.com/notifications/unsubscribe-auth/AAoicfpmRH8IS4p-BEKPPpBWFGQOLOP9ks5riThigaJpZM4MTCil .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How add new empty-lines in the message of one-line ...
git commit -m 'message including subject' -m 'and body lines'. Every -m text separated with an empty line so this command will produce...
Read more >
How to write a Git commit message properly with examples
In terms of formatting, there should always be an empty line between the subject line and the body. This space allows for various...
Read more >
TIL About Adding a New Line to "git commit -m" - rockyourcode
The text up to the first blank line in a commit message is treated as the commit title, and that title is used...
Read more >
Git Commit Message: Blank line between Subject & Body with ...
Enable all 4 Commit message inspects in Settings -> Version control -> Commit. Specifically, enable "Blank line between subject and body". · Create...
Read more >
Writing git commit messages that everybody understands
More detailed explanatory text. Wrap it to 72 characters. The blank line separating the summary from the body is critical (unless you omit ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found