You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remote.download(refspecs).then(function(result){// Use result});
| Parameters | Type |
| --- | --- | --- |
| refspecs | Strarray | the refspecs to use for this negotiation and download. Use NULL or an empty array to use the base refspecs |
Returns
Number
0 or an error code
Remote#dup Async
remote.dup().then(function(remote){// Use remote});
remote.fetch(refspecs,signature,reflog_message).then(function(result){// Use result});
| Parameters | Type |
| --- | --- | --- |
| refspecs | Strarray | the refspecs to use for this fetch. Pass NULL or an empty array to use the base refspecs. |
| signature | Signature | The identity to use when updating reflogs |
| reflog_message | String | The message to insert into the reflogs. If NULL, the default is "fetch" |
remote.push(refSpecs,options,signature,message).then(function(number){// Use number});
Pushes to a remote
| Parameters | Type |
| --- | --- | --- |
| refSpecs | Array | The ref specs that should be pushed |
| options | PushOptions | Options for the checkout |
| signature | Signature | The identity to use for the reflog of the updated references |
| message | String | The message to use for the update reflog messages |
Returns
Number
error code
Remote#pushurl Sync
varstring=remote.pushurl();
Returns
String
the url or NULL if no special url for pushing is set
Remote#refspecCount Sync
varresult=remote.refspecCount();
Returns
Number
the amount of refspecs configured in this remote
Remote#save Sync
varresult=remote.save();
Returns
Number
0, GIT_EINVALIDSPEC or an error code
Remote#setAutotag Sync
remote.setAutotag(value);
| Parameters | Type |
| --- | --- | --- |
| value | Number | a GIT_REMOTE_DOWNLOAD_TAGS value |
Remote#setCallbacks Sync
varresult=remote.setCallbacks(callbacks);
| Parameters | Type |
| --- | --- | --- |
| callbacks | RemoteCallbacks | a pointer to the user's callback settings |
Returns
Number
0 or an error code
Remote#setPushurl Sync
varresult=remote.setPushurl(url);
| Parameters | Type |
| --- | --- | --- |
| url | String | the url to set or NULL to clear the pushurl |
Returns
Number
0 or an error value
Remote#setUpdateFetchhead Sync
remote.setUpdateFetchhead(value);
| Parameters | Type |
| --- | --- | --- |
| value | Number | 0 to disable updating FETCH_HEAD |
Remote#setUrl Sync
varresult=remote.setUrl(url);
| Parameters | Type |
| --- | --- | --- |
| url | String | the url to set |
| Parameters | Type |
| --- | --- | --- |
| signature | Signature | The identity to use when updating reflogs |
| reflog_message | String | The message to insert into the reflogs. If NULL, the default is "fetch ", where is the name of the remote (or its url, for in-memory remotes). |
Returns
Number
0 or an error code
Remote#upload Sync
varresult=remote.upload(refspecs,opts);
| Parameters | Type |
| --- | --- | --- |
| refspecs | Strarray | the refspecs to use for this negotiation and upload. Use NULL or an empty array to use the base refspecs |
| opts | PushOptions | |