Description Usage Arguments Details Value Examples
This function creates a new branch in the specified repository in GitHub. It must be pointed at a commit by providing a Git reference, which can be either a SHA, branch or tag. For a branch, the head commit is used.
1 | create_branch(name, ref, repo, ...)
|
name |
(string) The name of the branch. |
ref |
(string) Either a SHA, branch or tag used to identify the commit. |
repo |
(string) The repository specified in the format: |
... |
Parameters passed to |
For more details see the GitHub API documentation:
create_branch()
returns a list of the branch's properties.
Branch Properties:
name: The name of the branch.
sha: The commit SHA the branch is pointing at.
protected: Whether the branch is protected.
html_url: The address of the branch's web page in GitHub.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
create_branch(
name = "new-branch",
ref = "main",
repo = "ChadGoymer/githapi"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.