question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use git cz globally, in non-npm / non-javascript projects

See original GitHub issue

Big fan of commitizen here. In so much that I’m trying to use it for projects that are not part of the NPM/node/javascript ecosystem. Any git repository, that is.

I can’t get that scenario to work. I’ve installed commitizen, conventional-changelog, cz-conventional-changelog globally with -g, but running git cz fails (and falls back to regular git) because the adapter is either not found, or not loaded. No surprise here I guess, since there is no package.json file, and there won’t be one in that repo. Would it be possible to provide a global configuration file, say ~/.czconfig, that the CLI would use when all else fails?

Thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

23reactions
sarbbottamcommented, Apr 24, 2016

I could get commitizen and cz-conventional-changelog work for non-node-git-repo with global installation.

Here are the steps that I have followed.

  • $ npm i -g commitizen cz-conventional-changelog
  • $ echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc; create .czrc
  • $ cd non-node-git-repo
  • $ touch foo
  • git cz -a

Hope it will be helpful.

1reaction
jimthedevcommented, Apr 25, 2016

@sarbbottam That would be great if you could put in a README PR! 👍

@sebastienbarre Yes this was a nice PR from someone that replace how I was using require and instead using .resolve which is much more consistent behavior with how other node modules typically let you provide input. Cheers to the contributors. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

git-cz - npm
... project by running `npm i git-cz`. There are 39 other projects in the npm registry using git-cz. ... Install globally with Commitizen....
Read more >
Commitizen - GitHub Pages
Simply use git cz or just cz instead of git commit when committing. ... Next, initialize your project to use the cz-conventional-changelog adapter...
Read more >
git-cz-for-api-developer - npm package - Snyk
Learn more about git-cz-for-api-developer: package health score, ... Snyk scans all the packages in your projects for vulnerabilities and ...
Read more >
commitizen/README.md - UNPKG
If you're not working in a Commitizen friendly repository, then `git cz` will work just the same as `git commit`. 22. 23, ###...
Read more >
CZ-cli: The Commitizen Command Line Utility - Morioh
Simply use git cz or just cz instead of git commit when committing. ... Many of the concepts can be applied to non-JavaScript...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found