Skip to contents

Creates a new branch and optionally switches to it.

Usage

git_branch(branch_name, checkout = TRUE)

Arguments

branch_name

Name of the new branch

checkout

Logical. Whether to checkout the new branch. Default is TRUE.

Value

Invisibly returns TRUE if successful

Examples

if (FALSE) { # \dontrun{
git_branch("feature/new-analysis")
git_branch("hotfix/bug-123", checkout = FALSE)
} # }