ghc_repos_git_delete_branch: Git Delete Branch

ghc_repos_git_delete_branchR Documentation

Git Delete Branch

Description

Deletes an existing branch for all repositories that match the prefix. Be warned that with this function the branch is deleted both locally and on the server so be careful when using it. Can be followed by ghc_repos_git_create_branch to recreate a branch with the same name but based on different commit (e.g. for rebranching an assignment branch off a specific commit).

Usage

ghc_repos_git_delete_branch(prefix, branch, 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)

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_create_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.