That is, I don't want to replace the work space,

but fetch a older version of file to /tmp?

Is that possible ?

link|improve this question

0% accept rate
feedback

2 Answers

git show $commitid:$filename > /tmp/$filename

Writes version $commitid of file $filename to /tmp/$filename.

link|improve this answer
feedback
  • You can't extract single file from remote repo
  • You can use git-archive in order to get minimail possible part or tree for needed changeset and remove unwanted files
  • You can git checkout cs in order to return to changeset, copy file out of tree and return back to HEAD git checkout

git man is your best friend

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.