Skip to contents

This function retrieves the information about the current (latest) git commit information in a specified repository directory.

Usage

get_git_commit(dir = getwd())

Arguments

dir

path to repository directory (default current directory)

Value

list with elements:

HEAD

Contents of HEAD

SHA

Unique commit identifier

COMMIT_MSG

Commit message

Examples

if (FALSE) {
get_git_commit()
}