Learn R Programming

git4r (version 0.1.2)

git_commit: Git Commit

Description

Make a commit checkpoint of the entire working directory except any changes which have not been added, or files listed in .gitignore. Run git_add() immediately before to confirm what changes are going to be included / excluded.

Usage

git_commit(message = NULL, confirm_id = TRUE)

Arguments

message

Commit message, usually one sentence about a specific change, character atomic. This is asked for interactively if left NULL.

confirm_id

Print out the current user identity which will be used for the commit (this is always done for git_pull() )

Value

Invisible NULL

Details

Commit messages are personal preference and many examples of good practice can be found online. These messages should be useful for:

  • informing yourself and others of what development choices have been made so far

  • searching for a particular change, for example like git_history(message='bugfix 123')

  • explaining a particular change for somebody else to review and accept

The current user identity (username and email) is printed to confirm who will be tagged as making the commit. If this has not yet been configured, these details are prompted interactively.

Amending commits is not currently possible (see issue #213 for git2r) therefore a commit message cannot be left blank.