I am working on a site with a server running Git. I am using Git for deployment (not GitHub). This was set up prior to my involvement using a hook method, and I referred to this
Try using:
git checkout branchName -- fileName
Ex:
git checkout master -- index.php