libgit2

git_remote_push

Version:

Perform a push.

If options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.

Signature

int git_remote_push(git_remote *remote, const git_strarray *refspecs, const git_push_options *opts);

Parameters

In
remote

the remote to push to

In
refspecs

the refspecs to use for pushing. If NULL or an empty array, the configured refspecs will be used

In
opts

options to use for this push

Returns

int

0 or an error code.

Versions