【发布时间】:2013-02-27 13:15:14
【问题描述】:
我正在尝试使用here 描述的方法将git 提交数据包含到 LaTex 文档中。
钩子看起来像这样:
$ cat post-commit
#!/bin/sh
cd ../..
git log -1 --format="format:\
\\gdef\\GITAbrHash{%h}\
\\gdef\\GITHash{%H}\
\\gdef\\GITAuthorDate{%ad}\
\\gdef\\GITAuthorName{%an}" >> git.tex
当我执行chmod a+x post-commit 然后./post-commit 时,会正确生成文件。但是,当我实际提交时,不会执行钩子。可能是什么问题?
【问题讨论】: