Reputation: 408
So I know we can checkout files from other branches into our current working branch with :
git checkout [someOtherBranch] [path/to/file]
What I'm hoping is that something like this is possible :
git checkout [someOtherBranch] [path/to/file] [path/we/want/to/copy/to]
Is this possible?
Upvotes: 2
Views: 446
Reputation: 14843
You can cat the contents of the file and then use standard shell redirection to put it wherever you want.
git show [someOtherBranch]:path/to/file > newpath/to/file
Upvotes: 5