The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Writing conventional commits with commitizen

Writing conventional commits with commitizen

4:47
Because semantic-release requires a specific message format, it's easier to follow this convention using a tool called commitizen. In this lesson, we'll use it to write our first conventional commit message.
Watch this lesson now
Avatar
egghead.io

Because semantic-release requires a specific message format, it's easier to follow this convention using a tool called commitizen. In this lesson, we'll use it to write our first conventional commit message.

Avatar
Eduardo

npm run commit didn't push the commit, how can i do this?

In reply to egghead.io
Avatar
David

Heads up, for now, you need to make sure the version of cz-conventional-changelog is 1.1.2, else you'll probably get an error:

Potentially unhandled rejection [3] Error: Error loading "word-wrap" at file: ...

Avatar
Steve

Great series! With the latest commitizen you get a (helpful) deprecation warning about using czConfig. The desired formatting is now:

"config": {
      "commitizen" : {
          "path": "node_modules/cz-conventional-changelog"
      }
  }
In reply to egghead.io
Avatar
Kent C.

Thank you for mentioning that. These lessons are due for an update. I hope to get to that soon.

In reply to Steve
Avatar
corderophilosophy

I ran into problems with commitizen 2.8.0 -- it wouldn't commit anything (as per this issue https://github.com/commitizen/cz-cli/issues/205). Using 2.7.6 works.

Avatar
Hozefa

How would this work in case of submitting PR's to a repo?

Also what if there are multiple commits per feature. How would I group commits?

In reply to egghead.io
Avatar
Kent C.

How would this work in case of submitting PR's to a repo?

Not sure what you mean. But if you want to learn about submitting PRs, you can watch my companion course: How to Contribute to an Open Source Project on GitHub

Also what if there are multiple commits per feature. How would I group commits?

Personally I often prefer features to be in a single commit. But with big features this isn't reasonable. So you create a branch and simply commit multiple times to that branch. Then you make a pull request from that branch to master when you're ready to ship it.

In reply to Hozefa
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?