Let’s say that I have a file core.clj in branch master at HEAD which is distinct from core.clj in branch other at HEAD, and that I am currently in branch other. I would like to checkout master’s core.clj into the current branch with some other file name, say tmp.clj, for easy comparison.
How can I do this?
You can use
git show master:core.cljto show the file. Redirect it to a new file (git show ... > temp.cljto save it for further processing.