Let's say as part of the build process for a website, I copy a git project to a web-accessible directory and remove the .git directory. Now, a few days later after I'm a few commits ahead of the public web directory, what's a simple way to figure out which version of /index.html is currently being served?
# /var/www (public web dir):
/index.html
# Git repository:
HEAD:/index.html
HEAD~1:/index.html
HEAD~2:/index.html
.
. <-- /var/www/index.html matches in here somewhere.
.
HEAD~N:/index.html
The only thing I can think to do is write a script to checkout every version of the file in git and check each one, but in my limited experience with git I've found that there is usually some canonical way to accomplish whatever git task I dream up.