3 ms·
That's dangerous unless you've properly configured your web server to block access to your .git directory.
by Sohcahtoa82 5y ago
That's dangerous unless you've properly configured your web server to block access to your .git directory.
- handrous 5y agoSafer/easier to keep the .git somewhere else entirely, rather than in the working directory. Git's got arguments that let you do that. Then you can check out to a dir that doesn't have the .git dir in it at all. Alternatively, it's pretty easy to use git-archive (optionally, with an exclusions list to keep out files you don't want to serve publicly) to do something similar without ever cloning the remote repo. You can fetch a zip or tar.gz with a given commit's files, straight from a remote repo.