libgit2

git_remote_new

Version:

Create a remote in memory

Create a remote with the default refspecs in memory. You can use this when you have a URL instead of a remote's name.

Signature

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

Parameters

In
out

pointer to the new remote object

In
repo

the associtated repository

const char *
In
url

the remote repository's URL

const char *
In
name

the remote's name

Returns

int

GIT_SUCCESS or an error code

Versions