update_from_github: Get updated files from a Github folder

View source: R/github.R

update_from_githubR Documentation

Get updated files from a Github folder

Description

Gets the latest files from the specified directory in a user's repository for a specific branch. It will download the specified folder, replace all files in the current working directory corresponding to the files in the repository without warning and then clean up.

Usage

update_from_github(directory, user, repo, branch, file_extensions = "")

Arguments

directory

A character string giving the full name of the Github folder with the theme to be downloaded.

user

A character string giving the user

repo

A character string giving the repository

branch

A character string giving the branch in the repository

file_extensions

A character vector with file extensions (excl. '.', e.g. c("R", "Rmd"))

Details

The intention behind the function is to have an easy way to update in particular templates and model examples in existing projects to the newest version on Github.

This function is exported for convenience, but it is recommended to use the wrapper functions update_*.

WARNING: If you have made local changes to the files in your project, then these will be lost when you run the function. This is also true for the update_* functions.


edsandorf/gizmo documentation built on Oct. 7, 2022, 3:45 p.m.