repo <- git_init(tempfile("git-history-"))
owd <- setwd(repo)
line1 <- "Thelma: You're a real live outlaw, aren't ya?"
line2 <- paste("J.D.: Well I may be an outlaw, darlin', but you're the one",
"stealing my heart.")
write(line1, "tl.txt")
git_commit("tl.txt", message = "first commit")
write(line2, "tl.txt", append = TRUE)
git_commit("tl.txt", message = "second commit")
git_history()
setwd(owd)
Run the code above in your browser using DataLab