Information Technology Reference
In-Depth Information
$ git add .gitattributes
$ git commit -m "Gitattributes to exclude /Tests/ and
/.gitattributes from ZIP"
The project has reached a stable point in its history. Tag it as v2.3.4 with the follow-
ing command:
$ git tag -a v2.3.4 -m "Release 2.3.4"
Finally, produce the zipped archive containing the version v2.3.4 of your project:
$ git archive --format=zip --output=../project-v2.3.4.zip
v2.3.4
This command will create the file git-recipes/project-v2.3.4.zip . The
file will contain your project without the Tests/ directory and without the .gitat-
tributes file. To list the contents of a zipped file, you can use the following com-
mand:
$ unzip -l ../project-v2.3.4.zip
How It Works
The command:
$ git archive --format=zip --output=filename.zip
[REVISION]
exports the project in the version stored in [REVISION] to the file named file-
name.zip . The file is stored in a ZIP format. Thanks to this command you don't have
to create zipped versions of your project, such as:
project-v0.1.2.zip
project-v2.8.4.zip
project-v5.15.89.zip
to preserve your project in a specific version. All you have to do is to create tags,
such as:
Search WWH ::




Custom Search