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 a (subdirectory of an) R package.

Value

Invisibly returns NULL after writing a global .gitignore file.

See also

Package maintenance helpers: update_docs()

Examples

# \dontrun{
add_global_gitgnore()
#>  Setting active project to "/tmp/RtmpbE1kC0/file1a0f13696044".
#>  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
# }