Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 771
NewToAngular Avatar asked Dec 21 '25 15:12

NewToAngular


1 Answers

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

like image 95
NewToAngular Avatar answered Dec 24 '25 08:12

NewToAngular



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!