Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use_git_hook

Add a git hook


Description

Sets up a git hook using specified script. Creates hook directory if needed, and sets correct permissions on hook.

Usage

use_git_hook(hook, script)

Arguments

hook

Hook name. One of "pre-commit", "prepare-commit-msg", "commit-msg", "post-commit", "applypatch-msg", "pre-applypatch", "post-applypatch", "pre-rebase", "post-rewrite", "post-checkout", "post-merge", "pre-push", "pre-auto-gc".

script

Text of script to run

See Also

Other git helpers: use_git_config(), use_git_ignore(), use_git()


usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.