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 *name, const char *url, const char *fetch);

Parameters

In
out

pointer to the new remote object

In
repo

the associtated repository

const char *
In
name

the remote's name

const char *
In
url

the remote repository's URL

const char *
In
fetch

the fetch refspec to use for this remote

Returns

int

0 or an error code

Versions