git_branch_create

Create a new branch pointing at a target commit

A new direct reference will be created pointing to this target commit. If force is true and a reference already exists with the given name, it'll be replaced.

The returned reference must be freed by the user.

The branch name will be checked for validity. See git_tag_create() for rules about valid names.

@param out_ Pointer where to store the underlying reference.

@param branch_name Name for the branch; this name is validated for consistency. It should also not conflict with an already existing branch name.

@param target Commit to which this branch should point. This object must belong to the given repo.

@param force Overwrite existing branch.

@return 0, git_error_code.GIT_EINVALIDSPEC or an error code. A proper reference is written in the refs/heads namespace pointing to the provided target commit.

extern (C) nothrow @nogc
int
git_branch_create

Meta