Skip to content

Instantly share code, notes, and snippets.

@viniciussbs
Forked from matthewhudson/good-commit.md
Last active February 3, 2017 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viniciussbs/75de245635d528c5778fb255063f393b to your computer and use it in GitHub Desktop.
Save viniciussbs/75de245635d528c5778fb255063f393b to your computer and use it in GitHub Desktop.
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.
@viniciussbs
Copy link
Author

Why signed-off commits:

If you want to contribute code, please either send signed-off patches or
a pull request with signed-off commits. If you don't sign off on them,
we will not accept them. This means adding a line that says
"Signed-off-by: Name " at the end of each commit, indicating that
you wrote the code and have the right to pass it on as an open source
patch.

See: http://developercertificate.org/

https://github.com/torvalds/subsurface-for-dirk/blob/a48494d2fbed58c751e9b7e8fbff88582f9b2d02/README#L79-L86

@viniciussbs
Copy link
Author

First version of the guide written by Linus: torvalds/subsurface-for-dirk@b659015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment