Magento version control systems such as Git and Subversion store their metadata in hidden folders. Someone access my directory and mail me. I think I am not protecting my GIT. can anyone tell me how can I do such a setting?
Your version control should not be in your live server at all. I know this happens a lot but is a bad practice.
If you are going to change something, i think you should start changing that.
In the production environment you should have only the application itself and any monitoring tool, but not version control. VCS should have an origin and working copies, and your prod environment is not the origin and it is not a working environment. Workspace and production are the most distant application stages, and like this you are mixing them together. Also, ssh to the server and do manual commands, and hot swap the code manually, is suicidal.
Look for any simple build/deployment system, and you will see that soon you will not need that anymore.
You can make it in a very simple way. start with jenkins. install Jenkins, preferably in a different server. set jenkins to pull the code in the job workspace, build your app, remove .git folder and
rsync to your server