git_history {git4r}R Documentation

Git Display History and Select Commit

Description

Display the history of commits in a specific branch with the option to filter. The list of commits is returned invisibly and can be extracted using ⁠[[i]]⁠ alternatively use git_get() to return the newest commit after filtering.

Usage

git_history(path = ".", branch = NULL, top = 10, ...)

git_get(path = ".", branch = NULL, ...)

Arguments

path

Only display / search commits which affect this path (dir or file)

branch

Name of branch to display. If a match cannot be found with git_get() in this branch, all branches are searched. Remote branches can be viewed by using the format "origin/master" providing that fetch or pull has downloaded changes.

top

Maximum number of commits to display (post-filtering)

...

Filters such as before='2021-01-01' or author='somebody'

Details

By default the history of the current branch is returned. The commits of a remote branch can be found using ⁠branch='origin/master⁠, for example.

The following filter arguments can be given:

If nothing could be matched, get_git() will start looking on other branches, for example when looking for a particular hash. The user is notified if this happens.

Value

Return the git_commit object which best matches a wide variety of types. This is used for git_diff() and git_checkout().

Vector of commit objects invisibly

Single commit object


[Package git4r version 0.1.2 Index]