R: Stage and commit changes

commit {gert} | R Documentation

## Stage and commit changes

### Description

To commit changes, start with staging the files to be included in the commit using `git_add()` or `git_rm()`. Use `git_status()` to see an overview of staged and unstaged changes, and finally `git_commit()` creates a new commit with currently staged files.

git_commit_all is a shorthand that will automatically stage all new and modified files and then commit.

Also `git_log()` shows the most recent commits and `git_ls()` lists all the files that are being tracked in the repository.

### Usage

    git_commit(message, author = NULL, committer = NULL, repo = ".")

    git_commit_all(message, author = NULL, committer = NULL, repo = ".")

    git_add(files, force = FALSE, repo = ".")

    git_rm(files, repo = ".")

    git_status(repo = ".")

    git_ls(repo = ".")

    git_log(ref = "HEAD", max = 100, repo = ".")

    git_reset(type = c("soft", "hard", "mixed"), ref = "HEAD",
      repo = ".")

### Arguments

`message` | a commit message
`author` | A git_signature value, default is git_signature_default.
`committer` | A git_signature value, default is same as `author`
`repo` | a path to an existing repository, or a `git_repository` object as returned by git_open, git_init or git_clone.
`files` | vector of paths relative to the git root directory. Use `"."` to stage all changed files.
`force` | add files even if in gitignore
`ref` | string with a branch/tag/commit
`max` | lookup at most latest n parent commits
`type` | must be one of `"soft"`, `"hard"`, or `"mixed"`

### See Also

Other git: `branch`, `fetch`, `git_config`, `repository`, `signature`

[Package gert version 0.3 Index]