Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabiospampinato/autogit-command-rollback
A command for rolling back the history to that of the origin and discarding local changes.
https://github.com/fabiospampinato/autogit-command-rollback
autogit command reset revert rollback
Last synced: 3 months ago
JSON representation
A command for rolling back the history to that of the origin and discarding local changes.
- Host: GitHub
- URL: https://github.com/fabiospampinato/autogit-command-rollback
- Owner: fabiospampinato
- License: mit
- Archived: true
- Created: 2018-10-17T19:22:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-24T20:28:21.000Z (almost 5 years ago)
- Last Synced: 2024-06-23T02:47:05.985Z (4 months ago)
- Topics: autogit, command, reset, revert, rollback
- Language: TypeScript
- Size: 16.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Autogit Command Rollback
A command for rolling back the history to that of the origin and discarding local changes.
This command is quite useful when developing other commands or plugins. You can test them, and if they don't work properly you can just roll back.
## Install
```sh
npm install --save autogit-command-rollback
```## Usage
#### Options
This command uses the following options object:
```js
{
remote: 'origin', // Resetting history up to the last commit present in this remote
rollback: { // Things to roll back
workingTree: true, // Discard all local changes
history: true // Discard all new commits compared to the remote
},
force: false // Don't ask for confirmation
}
```#### Configuration
Add this command to your configuration:
```js
const rollback = require ( 'autogit-command-rollback' );module.exports = {
commands: {
'rollback': rollback (),
'rollback-tree': rollback ({
rollback: {
workingTree: true
history: false
}
})
}
}
```#### CLI
Call it from the CLI with:
```sh
autogit rollback
autogit rollback-tree
```## License
MIT © Fabio Spampinato