repo <- git_init(tempfile("githug-branches-"))
owd <- setwd(repo)
## first commit
writeLines("Well, we're not in the middle of nowhere...", "nowhere.txt")
git_commit("nowhere.txt", message = "1: not in the middle of nowhere")
git_branch_list()
## Not run:
# ## in an interactive session, try this to checkout and create at once
# git_switch("louise")
# ## End(Not run)
git_branch_checkout("louise", create = TRUE)
git_branch_current()
setwd(owd)
Run the code above in your browser using DataLab