+ Git hooks allow scripts to be invoked when certain important git repository actions occur. + This configuration controls the execution of client-side hooks on Jenkins agents. + It is recommended that git hooks be disabled on Jenkins agents. +
++ Most git repositories do not use hooks in the repository and do not need repository hooks. + In those rare cases where repository hooks are needed, it is highly recommended that they are disabled on the Jenkins controller and on Jenkins agents. +
++ Client-side hooks are not copied when the repository is cloned. + However, client-side hooks might be installed in a repository by build steps or by misconfiguration. +
+
+ If hook scripts are allowed on agents, a client-side hook script installed in a repository on a Jenkins agent will execute when the matching git operation is performed.
+ For example, if hooks are allowed on agents and a git repository on an agent includes a post-checkout hook, the hook script will run on the agent after any checkout in that repository.
+ If hooks are allowed on agents and a git repository on an agent includes a pre-auto-gc hook, the hook script will run on the agent before any automatic git garbage collection task.
+
+ See "Customizing Git - Git Hooks" for more details about git repository hooks. +
++ Git hooks allow scripts to be invoked when certain important git repository actions occur. + This configuration controls the execution of client-side hooks on the Jenkins controller. + It is recommended that git hooks be disabled on the controller. +
++ The Jenkins controller uses git repositories to checkout Pipeline definitions, to detect changes in remote repositories, and to cache Pipeline shared libraries. + Jenkins jobs that run on the controller may use git repositories in many other ways. + It is strongly recommended that jobs are not run on the Jenkins controller. + Refer to the controller isolation documentation for more details. +
++ Client-side hooks are not copied when the repository is cloned. + However, client-side hooks might be installed in a repository by build steps or by misconfiguration. +
+
+ If hook scripts are allowed on the controller, a client-side hook script installed in a repository on the Jenkins controller will execute when the matching git operation is performed.
+ For example, if hooks are allowed on the controller and a git repository on the controller includes a post-checkout hook, the hook script will run on the controller after any checkout in that repository.
+ If hooks are allowed on the controller and a git repository on the controller includes a pre-auto-gc hook, the hook script will run on the controller before any automatic git garbage collection task.
+
+ See "Customizing Git - Git Hooks" for more details about git repository hooks. +
+