You can get a specific file from the Git repository. Sort of:
git show HEAD:filename.txt
If your repository is in a different directory, you can use GIT_DIR :
env GIT_DIR=/path/to/git/repo.git git show HEAD:filename.txt >filename.txt
I showed output redirection to a file.
source share