Returns a data.frame including the commit hash, last author and datetime of all commits for all input files.

gitLog(list_of_files, last_rev_only = FALSE)

Arguments

list_of_files

vector of file paths (can also pass only 1 file)

last_rev_only

if set to TRUE will only return the last commit, author and datetime of last revision

Examples

with_demoRepo({
  gitLog("script/examp-txt.txt")
})
#>                   file                              last_commit  last_author
#> 1 script/examp-txt.txt f035d4fa9f69e9118d7d608dd49c618f4ea25d1c Kyle Barrett
#> 2 script/examp-txt.txt ce0e8d1758103acf07c401a5b3c6e8b1cb28fecc Kyle Barrett
#> 3 script/examp-txt.txt 815e4710360de96e48c1942dbc27000da8a83399 Kyle Barrett
#>               last_datetime
#> 1 2025-01-17T10:06:48-05:00
#> 2 2025-01-17T10:06:48-05:00
#> 3 2025-01-17T10:06:48-05:00