For the "my repo, wrong branch" use case, you have some options:
git show other-branch:path/to/file
or: git grep -e pattern other-branch git show other-branch:path/to/file
or: git grep -e pattern other-branch