libgit2

git_remote_add_push

Version:

Add a push refspec to the remote's configuration

Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.

Signature

int git_remote_add_push(git_repository *repo, const char *remote, const char *refspec);

Parameters

In
repo

the repository in which to change the configuration

const char *
In
remote

the name of the remote to change

const char *
In
refspec

the new push refspec

Returns

int

0, GIT_EINVALIDSPEC if refspec is invalid or an error value

Versions