0

Is there a way to get a full content of a file (not just diff) in some commit, without using git checkout (because it pollutes the working directory)? Something like this:

$ git content 43fb721 --file main.rb => "class Main\nend\r"

1 Answer 1

1
$ git show HEAD~4:main.rb
$ git show <commit>:<filename>

Is exactly what I needed.

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