gi_fetch_templates: Fetch gitignore template(s) from gitignore.io

Description Usage Arguments Value Examples

View source: R/gi_fetch_templates.R

Description

Fetch gitignore template(s) from gitignore.io

Usage

1
2
3
4
5
6
gi_fetch_templates(
  template_name,
  copy_to_clipboard = FALSE,
  append_gitignore = FALSE,
  gitignore_file = here::here(".gitignore")
)

Arguments

template_name

A character vector with values included in gi_available_templates.

copy_to_clipboard

Logical. Should the returned template(s) be copied to the clipboard? Otherwise, it will be printed in the console. Default is FALSE.

append_gitignore

Logical. Should the .gitignore be modified to include the returned template(s)?

gitignore_file

The path of the .gitignore file to be modified. By default, it will try to find it in the current package/project using 'here::here(".gitignore")'.

Value

A character containing gitignore template(s).

Examples

1
2
3
4
5
6
7
8
# Fetch template for the R language
gi_fetch_templates("R")

# You can combine many templates at once
gi_fetch_templates(c("R", "python", "java"))

# The .gitignore file can be automatically modified with `append_gitignore = TRUE`
gi_fetch_templates(c("R", "python", "java"))

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