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

fabiospampinato/autogit-plugin-rollback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autogit Plugin - Rollback

A plugin for rolling back the history to that of the origin and discarding local changes.

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.

Install

npm install --save autogit-plugin-rollback

Usage

Options

This plugin 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 plugin to a command:

const rollback = require ( 'autogit-plugin-rollback' );

module.exports = {
  commands: {
    'my-command': [
      rollback ({
        rollback: {
          workingTree: true
          history: false
        }
      })
    ]
  }
}

License

MIT © Fabio Spampinato

About

A plugin for rolling back the history to that of the origin and discarding local changes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published