How to rollback "npm version minor" - updated minor instead of "patch"

2.3k Views Asked by At

I made a silly mistake, I wanted to update the version of my npm library by X.X.1 - basically I should have used npm version patch but because I am stupid I ran npm version minor. So my library version is 0.3.0 instead of 0.2.1. How do I undo the minor update so I can apply the patch?

I would rather do this through the terminal / command line as it would also update my lock file too.

I am currently looking through the docs but you often get a straight answer here and I find your comments most useful. Any help would be appreciated.

1

There are 1 best solutions below

1
NewToAngular On

After searching I just did a soft reset $ git reset --soft HEAD~1 and then applied the correct update command