git_diff: Show Changes (Diff)

View source: R/git_hooks.R

git_diffR Documentation

Show Changes (Diff)

Description

Show changes between commits, working tree, etc.

Usage

git_diff(staged = FALSE, file = NULL)

Arguments

staged

Logical; if TRUE, show staged changes (default: FALSE shows unstaged)

file

Optional file path to show diff for specific file

Value

Invisibly returns the diff output as a character vector

Examples


if (FALSE) {
git_diff()             # Show unstaged changes
git_diff(staged = TRUE) # Show staged changes
git_diff(file = "R/foo.R")
}



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