libgit2

git_remote_create

Version:

Add a remote with the default fetch refspec to the repository's configuration. This calls git_remote_save before returning.

Signature

int git_remote_create(git_remote **out, git_repository *repo, const char *name, const char *url);

Parameters

In
out

the resulting remote

In
repo

the repository in which to create the remote

const char *
In
name

the remote's name

const char *
In
url

the remote's url

Returns

int

0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code

Versions