libgit2

git_remote_create_detached

Version:

Create a remote without a connected local repo

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

Contrasted with git_remote_create_anonymous, a detached remote will not consider any repo configuration values (such as insteadof url substitutions).

Signature

int git_remote_create_detached(git_remote **out, const char *url);

Parameters

In
out

pointer to the new remote objects

const char *
In
url

the remote repository's URL

Returns

int

0 or an error code

Versions