This post on Hacker News discusses developers (or whoever really) including their .git folder when pushing to their production site. Not something I’ve ever had an issue with given my workflow. The HN piece linked to an article where the author discovered that some of the top 100,000 Alexa sites were including a .git folder on their live, public facing site. One of those sites is run by the Federal Communications Commission.
To check to see if you’re including a .git folder, just navigate to yourdomain.com/.git/config. Taking a look at the FCC’s git config file, we can see that they’ve also got a GitHub account, named fcc-admin! It’s a private GitHub account, though.
Because their .git folder is there, we can also see when they push new code to the fcc.gov website, via the .git/logs/HEAD file. You can have a look at it here. I wouldn’t be surprised if they remove this folder before too long. So, I’ve created a public Gist containing the contents of their git config file and the HEAD log file for archival purposes.