ghc_repos_git_create_branch: Git Create Branch

ghc_repos_git_create_branchR Documentation

Git Create Branch

Description

Creates a new branch and switches to it for all repositories that match the prefix. Note that the git command used for this is git checkout. Also be warned that unless parameter publish = FALSE, the new branch is published to the GitHub remote right away.

Usage

ghc_repos_git_create_branch(
  prefix,
  branch,
  parent = "master",
  publish = TRUE,
  folder = "."
)

Arguments

prefix

repository prefix (typically this would be a github classroom assignment prefix)

branch

branch name (for commands that interact with branches)

parent

parent branch name or commit SHAE to use for creating the new branch

publish

whether to publish the new branch, i.e. link it to the remote repository

folder

the target directory where to look for matching git repositories (searches recursively in all subdirectories)

Value

returns the prefix invisibly to facilitate piping

See Also

Other command functions: ghc_repos_copy_to(), ghc_repos_git_add(), ghc_repos_git_clone(), ghc_repos_git_commit(), ghc_repos_git_delete_branch(), ghc_repos_git_discard_changes(), ghc_repos_git_pull(), ghc_repos_git_push(), ghc_repos_git_remove(), ghc_repos_git_status(), ghc_repos_git_switch_branch(), ghc_repos_run_git_command()


KopfLab/ghctools documentation built on Feb. 20, 2023, 9:25 a.m.