Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding a way to use git commit #448

Closed
micky2be opened this issue Sep 19, 2017 · 6 comments · Fixed by #615
Closed

Finding a way to use git commit #448

micky2be opened this issue Sep 19, 2017 · 6 comments · Fixed by #615

Comments

@micky2be
Copy link

I think it would be nice to setup a pre-commit hook to run commitizen when running the command git commit.

I would personally rather my team use a command they already know than learning a new one.
Make it easier when switching projects.

@jimthedev
Copy link
Member

I would consider a PR with this functionality if it included some tests to show that it doesn't break existing tooling. People using commitizen bring a bunch of existing git commit hooks to the table and we'd need some way to still run those hooks and in the correct order with regards to commitizen.

@micky2be
Copy link
Author

Alright, I'll take a look.

@thedaviddias
Copy link

@micky2be Any news on creating a PR for that?

olgn added a commit to olgn/cz-cli that referenced this issue Mar 19, 2019
using git cz --hook in a git hook will allow 'git commit' to trigger commitizen

fix commitizen#448, re commitizen#462
olgn added a commit to olgn/cz-cli that referenced this issue Mar 20, 2019
using git cz --hook in a git hook will allow 'git commit' to trigger commitizen

fix commitizen#448, re commitizen#462
@olgn
Copy link
Contributor

olgn commented Mar 20, 2019

@jimthedev @thedaviddias I've got one open at #615

@thedaviddias
Copy link

That's awesome @olgn, thanks!

@olgn
Copy link
Contributor

olgn commented Mar 22, 2019

@thedaviddias any feedback is appreciated!

jimthedev pushed a commit that referenced this issue Apr 18, 2019
fixes #448 (re #462)

This pr allows project maintainers to enforce Commitizen generated commit messages as part of the workflow triggered by the `git commit` command. 

* implements the `--hook` flag, which directs Commitizen to edit the `.git/COMMIT_EDITMSG` file directly. 
* documents the use of the `--hook` flag in the `README`, both through traditional `git hooks` and `husky`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants