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.
npm install --save autogit-command-rollback
This command uses the following options object:
remote: 'origin' // Resetting history up to the last commit present in this remoterollback: // Things to roll backworkingTree: true // Discard all local changeshistory: true // Discard all new commits compared to the remoteforce: false // Don't ask for confirmation
Add this command to your configuration:
const rollback = ;moduleexports =commands:'rollback':'rollback-tree':
Call it from the CLI with:
autogit rollbackautogit rollback-tree
MIT © Fabio Spampinato