Tuesday, 27 August 2013

Git: check whether file exists in some version

Git: check whether file exists in some version

In my application, I'm using git for version management of some external
files
I'm using commands like git show HEAD~1:some_file to get a certain version
of a file. When the file does not exist, a 'fatal' message is outputted (I
think to the stderr pipe). e.g.
fatal: Path 'some_file' does not exist in 'HEAD~1'
Is there a clean command to check whether a file exists in a certain version?

No comments:

Post a Comment