## Not run:## Initialize a temporary repositorypath <- tempfile(pattern="git2r-")dir.create(path)repo <- init(path)## Config user and commit a fileconfig(repo, user.name ="Alice", user.email ="alice@example.org")lines <-"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do"writeLines(lines, file.path(path,"example.txt"))add(repo,"example.txt")commit(repo,"First commit message")## Get target (sha) pointed to by 'master' branchbranch_target(repository_head(repo))## End(Not run)