Rename an existing reference.
This method works for both direct and symbolic references.
The new name will be checked for validity.
See git_reference_symbolic_create()
for rules about valid names.
If the force
flag is not enabled, and there's already
a reference with the given name, the renaming will fail.
IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.
The new name for the reference
Overwrite an existing reference
The one line long message to be appended to the reflog
0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code