| layout |
default |
| menu_item |
api |
| title |
Reset |
| description |
Version 0.10.0 |
| return_to |
| API Documentation Index |
/api/ |
|
| sections |
| default |
fromAnnotated |
reset |
TYPE |
#default |
#fromAnnotated |
#reset |
#TYPE |
|
Reset.default(repo, target, pathspecs).then(function(result) {
// Use result
});
| Parameters |
Type |
|
| repo |
Repository |
Repository where to perform the reset operation. |
| target |
Object |
The committish which content will be used to reset the content of the index. |
| pathspecs |
Strarray |
List of pathspecs to operate on. |
| Returns |
|
| Number |
0 on success or an error code |
| < |
|
| 0 |
|
var result = Reset.fromAnnotated(repo, commit, reset_type, checkout_opts);
Reset.reset(repo, target, reset_type, checkout_opts).then(function(result) {
// Use result
});
| Parameters |
Type |
|
| repo |
Repository |
Repository where to perform the reset operation. |
| target |
Object |
Committish to which the Head should be moved to. This object must belong to the given repo and can either be a git_commit or a git_tag. When a git_tag is being passed, it should be dereferencable to a git_commit which oid will be used as the target of the branch. |
| reset_type |
Number |
Kind of reset operation to perform. |
| checkout_opts |
CheckoutOptions |
Checkout options to be used for a HARD reset. The checkout_strategy field will be overridden (based on reset_type). This parameter can be used to propagate notify and progress callbacks. |
| Returns |
|
| Number |
0 on success or an error code |
| Flag | Value |
| --- | --- | --- |
| Reset.TYPE.SOFT | 1 |
| Reset.TYPE.MIXED | 2 |
| Reset.TYPE.HARD | 3 |