Git Archive
Apart from enabling release management through tagging, Git enables the packaging of source code as zipped and .tar files, making them available for downloads on release pages, and sometimes on download or installation pages. This is achieved through the git archive
command.
Exercise 45: Packaging through GitHub Archive
To package source code using the git archive
command.
- From your terminal, ensure that you are on the master branch and that it is even with origin, as shown in the following screenshot:
Figure 6.43: Checkout of the master branch
- Run the
git archive
command with the arguments shown in the following screenshot:
Figure 6.44: Git archive
Note
The arguments are basically creating a compressed tarball for the abacus v1.0.0 release.
Outcome
Your path should now have the releases that can be uploaded or deployed to their respective pages, as shown in the following screenshot: