【发布时间】:2021-05-29 22:17:29
【问题描述】:
我在 UBUNTU 上使用 rails 工作
IM 触发了一个将 gitook 文件写入 git 目录的初始化程序,一切都很好,文件被创建的代码很好,但是在提交触发器上我得到了
hint: The '.git/hooks/commit-msg' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
该文件是使用可执行权限创建的....我认为?
new_file = File.new(file, File::CREAT|File::TRUNC|File::RDWR, 777)
但是,我认为我做错了什么或错过了许可步骤?
其次,如何从 gitook 访问提交中的变量?哪里有好的文档?
【问题讨论】:
标签: ruby-on-rails ruby git ubuntu githooks