libgit2

git_reference_rename_f

Version:

Rename an existing reference, overwriting an existing one with the same name, if it exists.

This method works for both direct and symbolic references. The new name will be checked for validity and may be modified into a normalized form.

The refernece will be immediately renamed in-memory and on disk.

Signature

int git_reference_rename_f(git_reference *ref, const char *new_name);

Parameters

const char *
In
new_name

Returns

int

Versions