I need to work on another branch, and don't know which branch. Several are listed and I can determine which branch I need based on the contents of certain key files. Is there a way to just take a peek at some of the files in the branches? Also, is this where I use stash
?
Asked
Active
Viewed 141 times
-2

Yimin Rong
- 1,890
- 4
- 31
- 48
-
Thank you. Just a matter of searching for the right words. – Yimin Rong Dec 10 '13 at 15:19
1 Answers
5
git show branch:file
Will work :)
You can also run
git grep pattern branch
So you can grep files from other branches
You can use git checkout
to bring the file from the other branch.

Marco
- 2,796
- 19
- 24