Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
74 characters or so. That way "git log" will show things
nicely even when it's indented.
Reported-by: whoever-reported-it
Signed-off-by: Your Name <youremail@yourhost.com>
where that header line really should be meaningful, and really should be
just one line. That header line is what is shown by tools like gitk and
shortlog, and should summarize the change in one readable line of text,
independently of the longer explanation.
@yihangho

This comment has been minimized.

Copy link

commented Aug 4, 2013

The link does not point to the correct line. Please update to: https://github.com/torvalds/subsurface/blob/master/README#L272

@yachi

This comment has been minimized.

@puzanov

This comment has been minimized.

Copy link

commented Jan 26, 2017

huh, seems that all my commits are lame

@heldrida

This comment has been minimized.

Copy link

commented Jan 26, 2017

Most common, say as much as possible with the smallest number of characters:

commit msg: fix

@antstorm

This comment has been minimized.

Copy link

commented Jan 26, 2017

I think all this points out is that you should format your commit messages to make it easier for the various tools to recognise and display properly. Unless there's a specific underlying format (like markdown or similar) it is the tool's job to figure out how to display the commit message

@manasRK

This comment has been minimized.

Copy link

commented Jan 26, 2017

Woah ! Seems one would have to be careful while making commits with minor big fixes.

@ghost

This comment has been minimized.

Copy link

commented Jan 26, 2017

Beautiful.

@orangle

This comment has been minimized.

Copy link

commented Jul 11, 2018

good

@abhijeetps

This comment has been minimized.

Copy link

commented Mar 10, 2019

There's a GitHub bot named DCO which checks if the PR follows this commit style: https://probot.github.io/apps/dco/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.