Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Commit bf84742

Browse files
Initial commit
0 parents  commit bf84742

10 files changed

+1547
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Numerous always-ignore extensions
3+
*.diff
4+
*.err
5+
*.log
6+
*.orig
7+
*.rej
8+
*.swo
9+
*.swp
10+
*.vi
11+
*.zip
12+
*~
13+
*.sass-cache
14+
*.ruby-version
15+
*.rbenv-version
16+
17+
# OS or Editor folders
18+
._*
19+
.cache
20+
.DS_Store
21+
.idea
22+
.project
23+
.settings
24+
.tmproj
25+
*.esproj
26+
*.sublime-project
27+
*.sublime-workspace
28+
nbproject
29+
Thumbs.db
30+
.fseventsd
31+
.DocumentRevisions*
32+
.TemporaryItems
33+
.Trashes
34+
35+
# Other paths to ignore
36+
bower_components
37+
node_modules
38+
dist

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018-present Fabio Spampinato
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a
6+
copy of this software and associated documentation files (the "Software"),
7+
to deal in the Software without restriction, including without limitation
8+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
9+
and/or sell copies of the Software, and to permit persons to whom the
10+
Software is furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21+
DEALINGS IN THE SOFTWARE.

README.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Autogit Plugin - Rollback
2+
3+
A plugin for rolling back the history to that of the origin and discarding local changes.
4+
5+
This plugin is quite useful when developing other plugins or commands. You can test them, and if they don't work properly you can just roll back.
6+
7+
## Install
8+
9+
```sh
10+
npm install --save autogit-plugin-rollback
11+
```
12+
13+
## Usage
14+
15+
#### Options
16+
17+
This plugin uses the following options object:
18+
19+
```js
20+
{
21+
remote: 'origin', // Resetting history up to the last commit present in this remote
22+
rollback: { // Things to roll back
23+
workingTree: true, // Discard all local changes
24+
history: true // Discard all new commits compared to the remote
25+
},
26+
force: false // Don't ask for confirmation
27+
}
28+
```
29+
30+
#### Configuration
31+
32+
Add this plugin to a command:
33+
34+
```js
35+
const rollback = require ( 'autogit-plugin-rollback' );
36+
37+
module.exports = {
38+
commands: {
39+
'my-command': [
40+
rollback ({
41+
rollback: {
42+
workingTree: true
43+
history: false
44+
}
45+
})
46+
]
47+
}
48+
}
49+
```
50+
51+
## License
52+
53+
MIT © Fabio Spampinato

0 commit comments

Comments
 (0)