Do we have to store Scripts for GIT hooks within same repository?

A Hook is local to a GIT repository. But the script attached to a hook can be created either inside the hooks directory or it can be stored in a separate repository. But we have to link the script to a hook in our local repository.

In this way we can maintain versions of a script in a separate repository, but use them in our repository where hooks are stored.

Also when we store scripts in a separate common repository, we can reuse same scripts for different purposes in multiple repositories.

Read the full book at www.amazon.com
Posted in GIT, GIT Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*