repo <- git_init(tempfile("githug-"))
owd <- setwd(repo)
write("Are these girls real smart or real real lucky?", "max.txt")
write("You get what you settle for.", "louise.txt")
git_status()
## try this interactively and accept the proposed auto-staging
# git_add()
git_add("max.txt", "louise.txt")
git_status()
write("If done properly armed robbery doesn't have to be a totally unpleasant experience.",
"jd.txt")
write("Is he your husband or your father?", "louise.txt", append = TRUE)
git_status()
git_stage(all = TRUE)
git_status()
git_commit(message = "Brains'll only get you so far and luck always runs out.")
git_status()
setwd(owd)
Run the code above in your browser using DataCamp Workspace