【发布时间】:2012-04-13 13:25:09
【问题描述】:
我第一次使用git hooks 并遇到了一个看似简单但到目前为止我还没有找到任何答案的问题。
我创建了一个 shell 脚本(直接调用时它工作正常),我想在 git post-commit-hook 中调用它。我知道我可以将脚本本身包含在挂钩中,但如果添加更多脚本,这可能会变得混乱。
挂钩文件的内容如下所示:
!/bin/sh
sh myshellscript.sh # This doesn't work by the way
: Nothing
钩子确实被执行了,但是没有找到myshellscript.sh。
放置 myshellscript.sh 的最佳位置在哪里以及如何引用它?
提前致谢!
【问题讨论】: