尝试运行命令时:
git p4 submit --shelve
(运行 git-p4.py
)我收到错误:
git: 'hook' is not a git command. See 'git --help'.
当我查看 git-p4.py
的代码时,我看到它正在尝试运行命令:
git hook run p4-prepare-changelist
但是,好像真的没有像git hook
这样的命令!错误消息说明了一切!那么这是怎么回事?
最佳答案
据我所知git hook run
将仅与 Git 2.36(2022 年第二季度)一起发布。
code评论中提到的已经被git/git
commit 0c8ac06介绍过了,这也适用于下一个 Git 版本。
It seems like the only way to get git-p4.py is to copy it from github . The one I have is the latest one from master
这意味着您需要一个与您的 git 版本
匹配的版本
例如:
关于git - 是否有 "git hook"命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71435280/