DEV Community

Discussion on: Finding exposed .git repositories

Collapse
 
phlash profile image
Phil Ashby

Thanks Ben, good advice!

If you are using git, then an archive is a neat way to generate deployable content: superuser.com/questions/81173/git-... You can do this away from the server and push the archive, or on the server (after the git pull!) to the web folder.

Subversion has the export command that operates similarly, generating a tree without the VCS control files.

Collapse
 
seds profile image
Ben Mezger (seds)

git archive is neat indeed, though I prefer to actually have a CI on the other end and take care of deploying the application for me. If you use AWS's Elastic Beanstalk, you can create a zip and deploy with eb deploy (although afaik it already creates a zip out of your git repo by using git archive)

I didn't know about subversion, it's a neat feature actually, does git have something similar without a zip?

Collapse
 
phlash profile image
Phil Ashby

Doesn't look like it - one always has to unpack, which is easiest with the tar formatted stream: git-scm.com/docs/git-archive