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.
Name for the branch; this name is validated for consistency. It should also not conflict with an already existing branch name.
Commit to which this branch should point. This object must belong to the given repo
.
Overwrite existing branch.
The one line long message to be appended to the reflog. If NULL, the default is "Branch: created"; if you want something more useful, provide a message.
0, GIT_EINVALIDSPEC or an error code. A proper reference is written in the refs/heads namespace pointing to the provided target commit.