gi_write_gitignore: Append or create a .gitignore file

Description Usage Arguments Value Examples

View source: R/gi_write_gitignore.R

Description

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

Usage

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

Arguments

fetched_template

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

gitignore_file

Path of the .gitignore file to modify.

Value

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

Examples

1
2
3
4
5
6
7
8
## Not run: 
f <- file.path(tempdir(), ".gitignore")
new_lines <- gi_fetch_templates("r")
gi_write_gitignore(new_lines, f)

unlink(f)

## End(Not run)

gitignore documentation built on Oct. 31, 2021, 5:06 p.m.