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.

git commit not returning to prompt

See original GitHub issue

Issue Description

After running git commit and going through the interactive prompts, commitizen doesn’t return to prompt. Instead it puts me into vim and am forced to exist with :qa.

I’m using the husky method:

"husky": {
  "hooks": {
    "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",

My environment: OSX: 10.15.7 Yarn 1.22.10 Node 12.20.1 NPM 6.14.10 commitizen: 4.2.3 cz-conventional-changelog: 3.3.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:14
  • Comments:7

github_iconTop GitHub Comments

ozumcommented, Feb 8, 2021

Same here. Until today, commitizen was working well.

OSX: 11.2 Node: 15.8.0 NPM: 7.5.2 commitizen: 4.2.3 husky: 5.0.8


. "$(dirname $0)/_/"

exec < /dev/tty && npx --no-install git cz --hook || true

I also got this error message: “could not determine executable to run”.

I got the same message when I manually execute npx --no-install git cz --hook.

Are there any steps to collect further info for diagnosis?


git-cz is locally installed and npx git-cz works.

Can I use exec < /dev/tty && npx --no-install git-cz --hook || true until a solution found?

raverackercommented, Jan 19, 2022

I think changing the prepare-commit-msg to below works

. "$(dirname $0)/_/"

exec < /dev/tty && npx git-cz --hook || true 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Commit not working in my Command prompt - Stack Overflow
You should set your email and name as specified in the error message by running git config --global "<>" git ...
Read more >
git-commit Documentation - Git
For example, git commit --amend --no-edit amends a commit without changing its commit message. Replace the tip of the current branch by creating...
Read more >
Re: [git-for-windows] Git doesn't detect file changes on Win10
I do not have .gitconfig settings like you do. You may want to selectively remove each of those settings to identify which is...
Read more >
Git Commit | Atlassian Git Tutorial
Committed snapshots can be thought of as “safe” versions of a project—Git will never change them unless you explicitly ask it to. Prior...
Read more >
Oh Shit, Git!?!
Oh shit, I need to change the message on my last commit! git commit --amend # follow prompts to change the commit message....
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 Post

No results found

github_iconTop Related Hashnode Post

No results found