autogit-command-rollback
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

npm install --save autogit-command-rollback

Usage

Options

This command uses the following options object:

{
  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:

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:

autogit rollback
autogit rollback-tree

License

MIT © Fabio Spampinato

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i autogit-command-rollback

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

6.25 kB

Total Files

8

Last publish

Collaborators

  • fabiospampinato