libgit2

git_reference_rename

Version:

Rename an existing reference

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(git_reference *ref, const char *new_name, int force);

Parameters

const char *
In
new_name
int
In
force

Returns

int

Versions