libgit2

git_remote_rename

Version:

Give the remote a new name

All remote-tracking branches and configuration settings for the remote are updated.

The new name will be checked for validity. See git_tag_create() for rules about valid names.

A temporary in-memory remote cannot be given a name with this method.

Signature

int git_remote_rename(git_remote *remote, const char *new_name, git_remote_rename_problem_cb callback, void *payload);

Parameters

In
remote

the remote to rename

const char *
In
new_name

the new name the remote should bear

In
callback

Optional callback to notify the consumer of fetch refspecs that haven't been automatically updated and need potential manual tweaking.

void *
In
payload

Additional data to pass to the callback

Returns

int

0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code

Versions