Is there any git hook for pull?

前端 未结 2 1142
轻奢々
轻奢々 2020-11-27 13:49

I need to perform some actions (prepare gettext *.mo message files) on my project everytime I run git pull. Is there any suitable git hook, which I could use fo

相关标签:
2条回答
  • 2020-11-27 13:51

    post-merge - see https://git-scm.com/docs/githooks#_post_merge for more details of how to use it.

    0 讨论(0)
  • 2020-11-27 14:10

    The githooks man page is a complete list of hooks. If it's not on there, it doesn't exist.

    That said, there is a post-merge hook, and all pulls include a merge, though not all merges are pulls. It's run after merges, and can't affect the outcome. It never gets executed if there were conflicts; you'd have to pick that up with the post-commit hook if it really matters, or invoke it manually.

    0 讨论(0)
提交回复
热议问题