
How to recover a file from another branch in Git
Estimated 1 minute readย ยทย Tuesday, 25 January 2022
git show branch:filename.ext > path/to/file.ext
Where branch can be any ref including a branch name, tag, HEAD.
Thanks to this Stack Overflow reference.