Commit
commit(
repo = ".",
message = NULL,
all = FALSE,
session = FALSE,
author = NULL,
committer = NULL
)a path to a repository or a git_repository
object. Default is '.'
The commit message.
Stage modified and deleted files. Files not added to Git are not affected.
Add sessionInfo to commit message. Default is FALSE.
Signature with author and author time of commit.
Signature with committer and commit time of commit.
A list of class git_commit with entries:
The 40 character hexadecimal string of the SHA-1
An author signature
The committer signature
The short "summary" of a git commit message, comprising the first paragraph of the message with whitespace trimmed and squashed.
The message of a commit
The git_repository object that contains the commit
if (FALSE) { # \dontrun{
## Initialize a repository
path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- init(path)
## Config user
config(repo, user.name = "Alice", user.email = "alice@example.org")
## Write to a file and commit
lines <- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do"
writeLines(lines, file.path(path, "example.txt"))
add(repo, "example.txt")
commit(repo, "First commit message")
} # }