Skip to contents

Tool: Git Commit

Usage

btw_tool_git_commit(message, files = NULL, `_intent` = "")

Arguments

message

A commit message describing the changes.

files

Optional character vector of file paths to stage and commit. Use "." to stage all changed files. If NULL, commits currently staged files.

_intent

An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool.

Value

Returns the commit SHA.

Examples

if (FALSE) { # \dontrun{
btw_tool_git_commit(message = "Fix bug in analysis", files = c("analysis.R"))
} # }