Rebase.init Async

Rebase.init(repo, branch, upstream, onto, opts).then(function(rebase) {
  // Use rebase
});
Parameters Type  
repo Repository The repository to perform the rebase
branch AnnotatedCommit The terminal commit to rebase, or NULL to rebase the current branch
upstream AnnotatedCommit The commit to begin rebasing from, or NULL to rebase all reachable commits
onto AnnotatedCommit The branch to rebase onto, or NULL to rebase onto the given upstream
opts RebaseOptions Options to specify how rebase is performed, or NULL
Returns  
Rebase  

Rebase.initOptions Sync

var result = Rebase.initOptions(opts, version);
Parameters Type  
opts RebaseOptions the git_rebase_options instance to initialize.
version Number the version of the struct; you should pass GIT_REBASE_OPTIONS_VERSION here.
Returns  
Number Zero on success; -1 on failure.

Rebase.open Async

Rebase.open(repo, options, callback).then(function(remote) {
  // Use remote
});

Opens an existing rebase that was previously started by either an invocation of Rebase.open or by another client.

Parameters Type  
repo Repository The repository that has a rebase in-progress
options RebaseOptions Options to specify how rebase is performed
callback Function  
Returns  
Remote  

Rebase#abort Async

rebase.abort().then(function(result) {
  // Use result
});
Returns  
Number Zero on success; GIT_ENOTFOUND if a rebase is not in progress,
-1 on other errors.  

Rebase#commit Async

rebase.commit(author, committer, message_encoding, message).then(function(oid) {
  // Use oid
});
Parameters Type  
author Signature The author of the updated commit, or NULL to keep the author from the original commit
committer Signature The committer of the rebase
message_encoding String The encoding for the message in the commit, represented with a standard encoding name. If message is NULL, this should also be NULL, and the encoding from the original commit will be maintained. If message is specified, this may be NULL to indicate that “UTF-8” is to be used.
message String The message for this commit, or NULL to use the message from the original commit.
Returns  
Oid  

Rebase#finish Sync

var result = rebase.finish(signature);
Parameters Type  
signature Signature The identity that is finishing the rebase (optional)
Returns  
Number Zero on success; -1 on error

Rebase#inmemoryIndex Sync

var result = rebase.inmemoryIndex(index);
Parameters Type  
index Index  
Returns  
Number  

Rebase#next Async

rebase.next().then(function(rebaseOperation) {
  // Use rebaseOperation
});
Returns  
RebaseOperation  

Rebase#operationByIndex Sync

var rebaseOperation = rebase.operationByIndex(idx);
Parameters Type  
idx Number The index of the rebase operation to retrieve
Returns  
RebaseOperation The rebase operation or NULL if idx was out of bounds

Rebase#operationCurrent Sync

var result = rebase.operationCurrent();
Returns  
Number The index of the rebase operation currently being applied.

Rebase#operationEntrycount Sync

var result = rebase.operationEntrycount();
Returns  
Number The number of rebase operations in total