I'd like to revert a file that has been renamed, say it's now called B, to what it was in an earlier commit, say it was called A, how would I do this while still preserving the history? File B has been pushed.
I can see the entire history of file B, including when it was named A, using:
git log --follow pathToFileB
This shows me a list of commits which this file was involved in, but I'm not sure what to do from there.
Normally, I'd do git checkout commitId:pathToFile
, but this doesn't seem to work in this case.