git_add: Stage Files for Commit

View source: R/git_hooks.R

git_addR Documentation

Stage Files for Commit

Description

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"))
}



framework documentation built on Feb. 18, 2026, 1:07 a.m.