这篇文章上次修改于 789 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
Sometimes we need to pack up our project as a compressed file such as an ZIP file. In the same time we only want to exactly ignored the file based on the .gitignore config. So here is where git archive command comes to the stage.
The basic usage of git archive command is like below:
git archive -o archive.zip HEADIn which:
-o / --outputSpecified the output name-f / --formatSpecified the compressed file format, e.g.:tar,zipHEAD / [BRANCH_NAME]Specified the branch you want to archive
没有评论