Deploying by running git pull on the server is convenient, and it leaves a .git directory next to your application. If that directory is inside the folder your web server publishes, it is readable over HTTP.
That matters more than it first appears. .git does not just describe the current files, it contains the repository's object database. With it, your full source code can be reconstructed, along with every version of every file that was ever committed.
So this exposes two things at once: your source code, including any server side logic you assumed was private, and your history. Credentials that were committed once and removed later are still in there, and they are still valid unless somebody rotated them.
