Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any git hook for pull?

Tags:

git

hook

gettext

People also ask

What is Git hook used for?

Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git's internal behavior and trigger customizable actions at key points in the development life cycle.

Where can I find Git hooks?

The hooks are all stored in the hooks subdirectory of the Git directory. In most projects, that's . git/hooks .


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.


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