Create, list, and checkout branches.

git_branch_list(repo = ".")

git_branch_checkout(branch, force = FALSE, repo = ".")

git_branch_create(name, ref = "HEAD", checkout = TRUE, repo = ".")

git_branch_delete(name, repo = ".")

git_branch_fast_forward(ref, repo = ".")

git_branch_set_upstream(remote = "origin", repo = ".")

git_branch_exists(name, local = TRUE, repo = ".")

Arguments

repo

The path to the git repository. If the directory is not a repository, parent directories are considered (see git_find). To disable this search, provide the filepath protected with I().

branch

name of branch to check out

force

ignore conflicts and overwrite modified files

name

string with name of the branch / tag / etc

ref

string with a branch/tag/commit

checkout

move HEAD to the newly created branch

remote

name of existing remote from git_remote_list

local

set FALSE to check for remote branch names.

See also