How do I get a fresh copy of a commit from say 5 previous commits ago?
Background:
I have a situation where some code I was working on which was working correctly but when checked out didn't work. Not sure what happened with the commit, but it could be a problem with the installation of a bower package.
I need to go back to the previous commit and try and redo the work and get it committed so that it works properly when the next person updates their code.
I've tried doing:
git checkout -b <branchname>
However this seems to have reverted back to the previous commit but still seems to have merged some files together. I need to be able to take a fresh copy of the previous commit.
Also as a side issue, when committing a bower package should I just add the package to the bower .json install file? So that when the next person checks it out the bower install runs for them?