Hello,
This is a quick / reference post illustrating how to archive (zip format) all the files in a branch in a Git repository.
From the command prompt, type:
git archive --format=zip -o files.zip master
Explanation:
- The “–format” argument lets you specify the archive type. I used the zip file format
- The “-o” argument lets you specify the output file name
- “master” is the name of the branch to be archived.
Do you want to master Batch Files programming? Look no further, the Batchography is the right book for you.
Available in print or e-book editions from Amazon.
You might also like:
- Batchography: Embedding an executable file in a Batch script
- Batchography: Reading a text file line by line in Batch files
- Batchography: How to do string substitution in the Batch scripting language?
- Batchography: Converting numbers to characters (or the CHR() function)
- Batchography: How to do “switch/case” in Batch files
- 7 DLL injection techniques in Microsoft Windows