cz-cli icon indicating copy to clipboard operation
cz-cli copied to clipboard

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

Open wgfire opened this issue 2 years ago • 2 comments

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

wgfire avatar Jul 31 '23 01:07 wgfire

Can anyone answer it

wgfire avatar Aug 01 '23 01:08 wgfire

Do you have git installed and in your path? Seems like you don’t have it in the path?

jimthedev avatar Dec 17 '23 21:12 jimthedev