Learn R Programming

ghclass (version 0.2.0)

branch: Create and delete branches in a repository

Description

  • branch_create - creates a new branch from an existing GitHub repo.

  • branch_delete - deletes a branch from an existing GitHub repo.

  • branch_remove - previous name of branch_delete, deprecated.

Usage

branch_create(repo, branch, new_branch)

branch_delete(repo, branch)

branch_remove(repo, branch)

Arguments

repo

Github repository address in owner/repo format.

branch

Repository branch to use.

new_branch

Name of branch to create.

See Also

repo_branches

Examples

Run this code
# NOT RUN {
repo_create("ghclass-test", "test_branch", auto_init=TRUE)

branch_create("ghclass-test/test_branch", branch = "main", new_branch = "test")
repo_branches("ghclass-test/test_branch")

branch_delete("ghclass-test/test_branch", branch="test")
repo_branches("ghclass-test/test_branch")

repo_delete("ghclass-test/test_branch", prompt = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab