Adds a global .gitignore file to the package. The file is based on the
default .gitignore provided by GitHub.
See also
usethis::use_git_ignore()adds entries to.gitignore.usethis::git_vaccinate()adds global Git ignore rules.
Package maintenance helpers:
update_docs()
Examples
# \dontrun{
add_global_gitgnore()
#> ✔ Setting active project to "/tmp/RtmpMnTOJq/file1ef44025effc".
#> ✔ 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
# }
