Skip to contents

Adds a global .gitignore file to the package. The file is based on the default .gitignore provided by GitHub.

Usage

add_global_gitgnore(pkg = ".")

Arguments

pkg

Path to the package root directory.

Value

NULL, invisibly, after updating .gitignore files.

See also

Package maintenance helpers: update_docs()

Examples

# \dontrun{
add_global_gitgnore()
#> ✔ Setting active project to "/tmp/Rtmp0BIyWG/file1aec5ecaf98".
#> ✔ Configuring core.excludesFile: ~/.gitignore
#> ✔ Creating the global (user-level) gitignore: ~/.gitignore
#> ✔ Adding ".Rproj.user", ".Rhistory", ".RData", ".httr-oauth", ".DS_Store", and
#>   ".quarto" to /home/runner/.gitignore.
#> Warning: cannot open file '.gitignore': No such file or directory
#> Error in file(con, "r"): cannot open the connection
# }