Thanks to visit codestin.com Credit goes to libgit2.org
Set the symbolic target of a reference.
The reference must be a symbolic reference, otherwise this method will fail.
The reference will be automatically updated in memory and on disk.
The reference
The new target for the reference
0 or an error code