How can I have Magit work with Commitizen?

470 Views Asked by At

I'm using Doom emacs with Magit in a repository leveraging husky to enforce commitizen

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

When initiating a commit (SPC g c c in Emacs Doom, or c c from Magit status), the hook is invoked, but there is no way to interact with commitizen and the process ends with no commit ever initiated. Meaning Magit cannot commit at all in husky-commitizen repositories. Is there a remedy for this while being considerate to other devs without magit?

1

There are 1 best solutions below

0
On

I normally do this by running magit-shell-command with ! s from the magit buffer magit.