Usage
gitCurrentBranch(repo = getwd())
gitDefaultBranch(repo = getwd(), remote = "origin")
Arguments
- repo
character(1)
.
Git repository directory path.
- remote
character(1)
.
Remote name.
Value
character(1)
.
Git branch name.
Examples
## > repo <- file.path("~", "git", "monorepo", "r-packages", "r-koopa")
## > gitCurrentBranch(repo)
## ## [1] "develop"
## > gitDefaultBranch(repo)
## ## [1] "main"