How to recover a file from another branch in Git
![Clarice Bouwer](/static/9f8039baec34d87ede445ff8b6068efb/ae1c8/avatar.png)
Clarice Bouwer
Software Engineering Team Lead and Director of Cloudsure
Tuesday, 25 January 2022 · Estimated 1 minute read
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.