我正在使用的一项服务(Overleaf)提供了一个 git 存储库接口。我想安装一个 post-receive 钩子,这样当我和我的合作者提交对存储库的更改时,我们将在Slack中收到通知。通常,这可以使用 Chris Eldredge 的git-slack-hook轻松完成,但它需要在服务器上安装 post-receive 钩子。在当前情况下,我无法直接访问 git 存储库服务器的文件系统。我尝试.git/hooks/post-receive
在本地副本中创建,但git
不允许我签入:
# git add .git/hooks/post-receive
error: Invalid path '.git/hooks/post-receive'
error: unable to add .git/hooks/post-receive to index
fatal: adding files failed
当您无法直接访问 git 存储库服务器的文件系统时,安装 post-receive 挂钩的正确程序是什么?
注意:这不是GitHub。