npm/npm — pull request #5970 by sorribas (2014-08-17 02:06:36+00:00)
Title: Undo commits when git tag fails on npm version.

Sometimes I do `npm version something` and right away I realize I forgot something. So I run `git reset --hard HEAD^`, I do whatever I wanted to do, commit, and then run `npm version something` again. But I sometimes forget to remove the tag that `npm version` created, so npm fails because the tag already exists.

That's perfectly fine, but the thing is that even though npm failed to create the tag, it still creates the commit and changed the package.json file. I think it should rollback the entire operation if it fails to create the tag and that's what this PR does.