I would like to return the file that was renamed, say, now it is called B, to the fact that it was in an earlier commit, for example, it is called A, how would I do this, while preserving the history? File B was pressed.
I can view the entire history of file B, including when it was named A, using:
git log --follow pathToFileB
This shows me a list of commits that this file participated in, but I'm not sure what to do next.
Normally I would do a git checkout commitId:pathToFile
, but in this case it does not work.
source share