This question has already been answered:
- Remove repository from working directory 2 replies
On the production server, in the root folder of the site public_html, in addition to the site’s files and folders, there is actually a .git pack. Updating site files comes from the Git repository. How can you move the .git folder above the public_html directory without breaking anything (so that the git pull command updates the contents of the public_html folder as before)