DEV Community

Discussion on: Git commit message convention that you can follow!

Collapse
 
abbadev profile image
Abdulla T

Nice post. I have a follow up question and Im interested in how its done in different companies.

Suppose you have a big feature that involves infra change, refactoring, new dependency and new styles, basically a big cocktail of the commits that are all connected. Normally some wld commit to a branch then do a PR, but in this situation since these all commits serve a single feature the commits will get squashed into one commit before its merged to the main branch. I guess the squashed commit will use the proper convention message that you described, but those individual commits dont matter, unless your company enforces PR review per commit? I know that some big companies wld even enforce a commit per each function/block/file and each commit requires a PR review. But these PR reviews are so quick bcz they are on small commits.

What other practices ppl have used/dealt with, and which ones do ppl prefer?

Collapse
 
sebring profile image
J. G. Sebring

feat or breaking, but theses kind of changes should be taken seriously when writing the commit message, I've sometimes used commit messages (from the squash) inside the message of the actual feat commit.
like

feat: adds authorization

Adds OATH bla bla... 
refactor: adds authorization to protected pages
refactor: redirect to login page
Enter fullscreen mode Exit fullscreen mode