Saturday, March 16, 2013

The second-order-diff Git trick - Tom Moertel’s Blog

The second-order-diff Git trick - Tom Moertel’s Blog: "The idea is to replace git reset with git stash, should you need to back up and try again with an adjusted sledgehammer. Using stash not only resets your working tree back to the starting point but also stashes the result of the applying the previous sledgehammer. Then you can apply your new sledgehammer and use git diff stash to review how it changed your original working tree differently than the previous sledgehammer. In this way, you can more easily verify that adjusting your sledgehammer worked as expected. Once everything looks good, git commit as usual."

'via Blog this'