Skip to contents

This function creates a .gitignore file at the root of the project based on a template (specific to R). If a .gitignore is already present, files to be untracked by git are just added to this file.

Usage

add_to_gitignore(x, open = FALSE, quiet = FALSE)

Arguments

x

A character vector. One or several files/folders names to be added to the .gitignore.

open

A logical value. If TRUE the .gitignore file is opened in the editor. Default is FALSE.

quiet

A logical value. If TRUE messages are deleted. Default is FALSE.

Value

No return value.

Examples

if (FALSE) { # \dontrun{
add_to_gitignore(open = TRUE)
add_to_gitignore(".DS_Store")
} # }