Live data from Hacker News

Git commit message styleguide

github.com

11–20 of 39 posts

Re: Git commit message styleguide

#11
post #8

Emoji might actually be usefull for quick oversight, but how can you include a reference to an issue for every commit? What if you are just adding more tests?

I've seen this kind of thing work really well for some teams. In that case there should be a "ref" for adding tests.

It tends to act as resource management, you shouldn't be working on things that your manager doesn't know about at least enough to make an "issue" for it.

But it's not a 100% must in all cases, just that there SHOULD be a ref there. The rule of thumb for us was if it's going to take more than 15 minutes, it needs an issue.

Edit:

I can't seem to reply any more, but this is just for organization. you can create your own issue and work on it on your own, this is just a way to organize and categorize the commits and provide an easy "parsable" way to give some context to them.

Re: Git commit message styleguide

#14

Oh, please don't... I've seen CI systems broken because of Unicode in git commit lines... :-/

this guide doesn't use any fancy-unicodes... I'm guessing that :penguin: isn't a unicode-penguin character, but some emoji supported natively by github

(e.g. :+1: means thumbs-up, but that's native to github / shows as :+1: to non-emoji-supported cli/browser/etc.)

Re: Git commit message styleguide

#15

Oh, please don't... I've seen CI systems broken because of Unicode in git commit lines... :-/

I'm not a huge fan of mandatory emoji in commit messages either, but this is a poor excuse. A Git commit message can contain any sequence of bytes except for a NUL byte. It can even contain invalid UTF-8. Tooling that doesn't treat commit messages like this is dangerously fragile. God forbid anyone accidentally pastes “typographer’s quotes” or text with diacritics into a commit message and breaks the build.

On the plus side, I don't think this style guide will break your CI. It seems to be taking advantage of GitHub's text => emoji substitution, so other Git tools will just see the text form (eg. :sparkles:)

Re: Git commit message styleguide

#17
post #2

someone tell me this is a joke?

Hard to tell.. I live by rules 8/9/10 [1] and some others to a lesser extent, but the emojis (which don't even come close to verbs describing what happens) make it quite funny.

[1] 8. Use the Present Tense ("Add feature" not "Added feature"). 9. Use the Imperative Mood ("Move cursor to..." not "Moves cursor to..."). 10. Use the Message body to explain what and why vs. how.

Re: Git commit message styleguide

#20
> Use Valid MarkDown format in Message Body.

I like to keep Markdown away from my repos. After a while people get clever with their Markdown and it makes reading commit logs using command-line tools increasingly difficult. It also encourages writing things into commit logs that would be better suited for documentation.

Edit: apparently it's not a Github specific thing.

Post reply on HN