Learn R Programming

gitignore (version 0.1.7)

gi_write_gitignore: Append or create a .gitignore file

Description

Use the returned template(s) to append the existing .gitignore file.

Usage

gi_write_gitignore(fetched_template, gitignore_file = here::here(".gitignore"))

Value

TRUE if succeeds to write/append the .gitignore, FALSE otherwise.

Arguments

fetched_template

Template(s) returned by `gi_fetch_templates()`.

gitignore_file

Path of the .gitignore file to modify.

Examples

Run this code
if (FALSE) {
f <- file.path(tempdir(), ".gitignore")
new_lines <- gi_fetch_templates("r")
gi_write_gitignore(new_lines, f)

unlink(f)
}

Run the code above in your browser using DataLab