commitizen / commitizen/cz-cli

pathspec 'git' did not match any file(s) known to git

未关闭
#977 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
17.5k
派生
566
平均合并
8 小时 16 分钟
30 天内合并 PR
1

描述

```
import { bootstrap } from "commitizen/dist/cli/git-cz"
import path from "path"

export const runCommitCZ = () => {
const cliPath = path.join(__dirname, "../../../../node_modules/commitizen")
console.log(cliPath, "czpath")

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
bootstrap({
cliPath,
config: {
path: "cz-conventional-changelog"
}
})
}
```
```
const program = new Command()
export const git = program
.command("git")
.description("use git add git commit git push ")
.action(arg => {
runCommitCZ()
})
```
erro pathspec 'git' did not match any file(s) known to git
git exited with error code 1
at ChildProcess. (D:\bBoyCli\node_modules\commitizen\dist\git\commit.js:810:28)

How can I modify and fix this problem, thanks for help

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。