Git / How to archive current repo to a zip archive

Git has this functionality built-in. The following command will archive the current git repo's state (HEAD) in a zip archive and name it with the current directory name:

git archive -o "${PWD##*/}.zip" HEAD

No comments:

Post a Comment