1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/install-git.R
3\name{install_git}
4\alias{install_git}
5\title{Install a package from a git repository}
6\usage{
7install_git(
8  url,
9  subdir = NULL,
10  ref = NULL,
11  branch = NULL,
12  credentials = git_credentials(),
13  git = c("auto", "git2r", "external"),
14  dependencies = NA,
15  upgrade = c("default", "ask", "always", "never"),
16  force = FALSE,
17  quiet = FALSE,
18  build = TRUE,
19  build_opts = c("--no-resave-data", "--no-manual", "--no-build-vignettes"),
20  build_manual = FALSE,
21  build_vignettes = FALSE,
22  repos = getOption("repos"),
23  type = getOption("pkgType"),
24  ...
25)
26}
27\arguments{
28\item{url}{Location of package. The url should point to a public or
29private repository.}
30
31\item{subdir}{A sub-directory within a git repository that may
32contain the package we are interested in installing.}
33
34\item{ref}{Name of branch, tag or SHA reference to use, if not HEAD.}
35
36\item{branch}{Deprecated, synonym for ref.}
37
38\item{credentials}{A git2r credentials object passed through to clone.
39Supplying this argument implies using \code{git2r} with \code{git}.}
40
41\item{git}{Whether to use the \code{git2r} package, or an external
42git client via system. Default is \code{git2r} if it is installed,
43otherwise an external git installation.}
44
45\item{dependencies}{Which dependencies do you want to check?
46Can be a character vector (selecting from "Depends", "Imports",
47"LinkingTo", "Suggests", or "Enhances"), or a logical vector.
48
49\code{TRUE} is shorthand for "Depends", "Imports", "LinkingTo" and
50"Suggests". \code{NA} is shorthand for "Depends", "Imports" and "LinkingTo"
51and is the default. \code{FALSE} is shorthand for no dependencies (i.e.
52just check this package, not its dependencies).
53
54The value "soft" means the same as \code{TRUE}, "hard" means the same as \code{NA}.
55
56You can also specify dependencies from one or more additional fields,
57common ones include:
58\itemize{
59\item Config/Needs/website - for dependencies used in building the pkgdown site.
60\item Config/Needs/coverage for dependencies used in calculating test coverage.
61}}
62
63\item{upgrade}{Should package dependencies be upgraded? One of "default", "ask", "always", or "never". "default"
64respects the value of the \code{R_REMOTES_UPGRADE} environment variable if set,
65and falls back to "ask" if unset. "ask" prompts the user for which out of
66date packages to upgrade. For non-interactive sessions "ask" is equivalent
67to "always". \code{TRUE} and \code{FALSE} are also accepted and correspond to
68"always" and "never" respectively.}
69
70\item{force}{Force installation, even if the remote state has not changed
71since the previous install.}
72
73\item{quiet}{If \code{TRUE}, suppress output.}
74
75\item{build}{If \code{TRUE} build the package before installing.}
76
77\item{build_opts}{Options to pass to \verb{R CMD build}, only used when \code{build} is \code{TRUE}.}
78
79\item{build_manual}{If \code{FALSE}, don't build PDF manual ('--no-manual').}
80
81\item{build_vignettes}{If \code{FALSE}, don't build package vignettes ('--no-build-vignettes').}
82
83\item{repos}{A character vector giving repositories to use.}
84
85\item{type}{Type of package to \code{update}.}
86
87\item{...}{Other arguments passed on to \code{\link[utils:install.packages]{utils::install.packages()}}.}
88}
89\description{
90It is vectorised so you can install multiple packages with
91a single command. You do not need to have the \code{git2r} package,
92or an external git client installed.
93}
94\details{
95If you need to set git credentials for use in the \code{Remotes} field you can do
96so by placing the credentials in the \code{remotes.git_credentials} global
97option.
98}
99\examples{
100\dontrun{
101install_git("https://github.com/hadley/stringr.git")
102install_git("https://github.com/hadley/stringr.git", ref = "stringr-0.2")
103}
104}
105\seealso{
106Other package installation:
107\code{\link{install_bioc}()},
108\code{\link{install_bitbucket}()},
109\code{\link{install_cran}()},
110\code{\link{install_dev}()},
111\code{\link{install_github}()},
112\code{\link{install_gitlab}()},
113\code{\link{install_local}()},
114\code{\link{install_svn}()},
115\code{\link{install_url}()},
116\code{\link{install_version}()}
117}
118\concept{package installation}
119