How can I have Magit work with Commitizen?
Asked Answered
C

1

6

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?

Carmella answered 24/1, 2021 at 10:53 Comment(1)
Datner, were you able to solve the issue? I'm facing the same problem, maybe looking to make some package.Straightout
A
0

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

Androcles answered 2/9, 2022 at 10:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.