libgit2

git_reference_set_target

Version:

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.

Signature

int git_reference_set_target(git_reference *ref, const char *target);

Parameters

In
ref

The reference

const char *
In
target

The new target for the reference

Returns

int

GIT_SUCCESS or an error code

Versions