repo <- git_init(tempfile("githug-branches-"))
owd <- setwd(repo)
## commit so that master branch exists
writeLines("Well, we're not in the middle of nowhere...", "nowhere.txt")
git_commit("nowhere.txt", message = "... but we can see it from here.")
git_branch_list()
## rename master
git_branch_rename("master", "louise")
git_branch_list()
setwd(owd)
Run the code above in your browser using DataLab