Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really recommend angular-style commit messages: https://github.com/angular/angular.js/blob/master/CONTRIBUTI...

type(scope) message

e.g.

feat(button) added play button

Types are:

- feat: A new feature

- fix: A bug fix

- docs: Documentation only changes

- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)

- refactor: A code change that neither fixes a bug nor adds a feature

- perf: A code change that improves performance

- test: Adding missing or correcting existing tests

- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation



If you like this format, then you may want to try a similar format that uses the same purpose, plus uses words that easier to read and that make more sense to people in more cultures.

We use Add, Fix, Refactor, Reformat, Optimize, etc.

See my comment on this thread or https://github.com/joelparkerhenderson/git_commit_message


I don't mind command names.

However, in the linked article no visual separation between type and message (and no scope) is something I consider less useful.


Agreed. I started using these on private & professional projects a year ago (and mostly got the team to use them, too) and it's a pleasure to browse the git log!

In the beginning the definition of "scope" is a bit wonky per project. However, once it solidifies you can easily start going through your log looking for "feat(endpoint)" to find new routes that have been added to an API for example.


I started using https://commitizen.github.io/cz-cli/ to help me self-enforce this style of commit messages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: