commit {git2r} | R Documentation |
Commit
commit(repo, message = NULL, all = FALSE, session = FALSE, reference = "HEAD", author = default_signature(repo), committer = default_signature(repo)) ## S4 method for signature 'git_repository' commit(repo, message = NULL, all = FALSE, session = FALSE, reference = "HEAD", author = default_signature(repo), committer = default_signature(repo))
repo |
The repository |
message |
The commit message. |
all |
Stage modified and deleted files. Files not added to Git are not affected. |
session |
Add sessionInfo to commit message. Default is FALSE. |
reference |
Name of the reference that will be updated to point to this commit. |
author |
Signature with author and author time of commit. |
committer |
Signature with committer and commit time of commit. |
git_commit
object
## Not run: ## 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 writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", file.path(path, "example.txt")) add(repo, "example.txt") commit(repo, "First commit message") ## End(Not run)