framework docs
Git

git_add()

Stage Files for Commit

Add file contents to the staging area.

Usage

git_add(files = ".")

Arguments

files
Character vector of file paths to stage, or "." for all (default)

Value

Invisibly returns TRUE on success

Examples

if (FALSE) {
git_add()              # Stage all changes
git_add("README.md")   # Stage specific file
git_add(c("R/foo.R", "R/bar.R"))
}