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
This can be the solution:
git fetch git checkout origin/master -- FolderPathName/fileName
Thanks.