Git hook 输出 - 在哪里可以看到/找到
我正在尝试在 Windows 上使用 Git 运行 git commit email hook。我确信我的 contrib/hooks/post-receive-email 副本(放置在项目的 .git/hooks/post-commit 中)脚本搞砸了,或者我在配置中缺少一个重要节点,但我不知道在哪里会看到任何错误消息。
当我使用 shell 提交时,它们会回显到标准输出吗?是否有一些标志我需要设置或传递给 git commit 才能看到它们(我尝试了 -v 但没有明显效果)?
编辑 以下是我添加的特定于存储库的配置值:
- sendemail.smtpserver=smtp.mycompany.com
- [电子邮件受保护]
更新 总体问题是 git 的内置邮件无法在 Windows 上运行(当然,这完全有道理),但至少现在我知道在哪里寻找我的黑客尝试的输出。
I'm trying to get a git commit email hook running using Git on Windows. I'm sure I've got my copy of contrib/hooks/post-receive-email (placed in the project's .git/hooks/post-commit) script messed up, or I'm missing an important node in my config, but I don't know where I would see any error messages.
Would they be echoed to stdout when I commit using a shell? Is there some flag I would need to set or pass to git commit to see them (I tried -v with no apparent effect)?
EDIT
Here are the repo-specific config vals I've added:
- sendemail.smtpserver=smtp.mycompany.com
- [email protected]
UPDATE
The overall problem is that git's built-in mail doesn't work on windows (which makes perfect sense, of course), but at least now I know where to look for output from my hacking attempts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定钩子实际上正在执行吗? (确保它是可执行的!)提交后挂钩的运行方式与 git-commit 相同,因此如果您从 shell 提交,您应该看到所有与提交相关的挂钩的输出以及 git- 的输出在该终端中提交自己。
Are you sure the hook is actually being executed? (Make sure it's executable!) The post-commit hook is run in the same way as git-commit, so if you commit from a shell, you should see the output of all the commit-related hooks along with the output of git-commit itself in that terminal.