Saturday, February 22, 2014

Making a Deployment Package From a Git Repository

I have a Django application in a git repository, and the whole thing needs to be moved to a server. I want to copy the application, but I don't want to drag the git repository info along with it.

To spit out a zip file with the whole folder structure, but without the git repository info, go to the top level directory and enter the following command:

git archive -o ../ HEAD

This will create a zip file and dump it in the directory above (presumably outside of the git repository).

No comments:

Post a Comment