Skip to content

Commit

Permalink
Merge pull request #68 from stewid/vignette-branch-name
Browse files Browse the repository at this point in the history
vignette: handle when 'defaultBranch' is specified in '.gitconfig'
  • Loading branch information
ThierryO authored Feb 25, 2022
2 parents 5948e7b + 372e4b6 commit 63f80ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vignettes/workflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ writeLines("*extra*", file.path(path, ".gitignore"))
git2r::add(init_repo, ".gitignore", force = TRUE)
git2r::commit(init_repo, message = "Initial commit")
# push initial commit to remote
git2r::push(init_repo, "origin", "refs/heads/master") # nolint
branch_name <- git2r::branches(init_repo)[[1]]$name
git2r::push(init_repo, "origin", paste0("refs/heads/", branch_name))
rm(init_repo)
```

Expand Down

0 comments on commit 63f80ef

Please sign in to comment.