Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.63 KB

File metadata and controls

52 lines (42 loc) · 1.63 KB
layout default
menu_item api
title Revert
description Version 0.26.1
return_to
API Documentation Index
/api/
sections
commit revert
#commit
#revert

Revert.commit Async

Revert.commit(repo, revert_commit, our_commit, mainline, merge_options).then(function(index) {
  // Use index
});

Reverts the given commit against the given "our" commit, producing an index that reflects the result of the revert.

Parameters Type
repo Repository the repository that contains the given commits.
revert_commit Commit the commit to revert
our_commit Commit the commit to revert against (e.g. HEAD)
mainline Number the parent of the revert commit, if it is a merge
merge_options MergeOptions the merge options (or null for defaults)
Returns
Index the index result

Revert.revert Async

Revert.revert(repo, commit, revert_options).then(function() {
  // method complete});

Reverts the given commit, producing changes in the index and working directory.

Parameters Type
repo Repository the repository to perform the revert in
commit Commit the commit to revert
revert_options RevertOptions the revert options (or null for defaults)