Create a new symbolic reference.
A symbolic reference is a reference name that refers to another reference name. If the other name moves, the symbolic name will move, too. As a simple example, the "HEAD" reference might refer to "refs/heads/master" while on the "master" branch of a repository.
The symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
Valid reference names must follow one of two patterns:
This function will return an error if a reference already exists with the
given name unless force
is true, in which case it will be overwritten.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
The name of the reference
The target of the reference
Overwrite existing references
The one line long message to be appended to the reflog
0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code