gitBranch: Git branch strings

gitBranchR Documentation

Git branch strings

Description

Git branch strings

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.

Note

Updated 2022-05-02.

See Also

  • koopa::git_default_branch (shell).

  • ⁠git branch⁠ (shell).

  • git2r package.

Examples

## > repo <- file.path("~", "git", "monorepo", "r-packages", "r-koopa")
## > gitCurrentBranch(repo)
## ## [1] "develop"
## > gitDefaultBranch(repo)
## ## [1] "main"

acidgenomics/acidbase documentation built on Jan. 26, 2024, 4:26 p.m.