Internally, the "Download Zip" feature from GitHub leverages git archive
.
git archive
actually performs a checkout of the pointed at commit, streaming the content to the tar or zip archiver.
The way the line endings are being dealt with, during the checkout process, eventually depends on the platform the command is being run on.
As GitHub servers are Linux based, the selected line ending for text files will be the Linux native one (i.e. LF).
So there's (currently) no way to interfere with this and text files inside your zip/tar downloads will be LF terminated.
However you may still
- Use a tool like Unix2Dos to batch convert your text files
- Send a mail to support@github.com and request for a change to their UI so that one could potentially select the expected line endings