Skip to contents

Adds a global .gitgnore file to the package. File based on default .gitignore provided by GitHub.

Usage

add_global_gitgnore(pkg = ".")

Arguments

pkg

Path to a (subdirectory of an) R package.

Value

Invisible, and writes a global .gitignore file

Examples

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