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.clj
to show the file. Redirect it to a new file (git show ... > temp.clj
to save it for further processing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With