After some testing, it seems that if you use a eol=crlf
property in your .gitattributes
file, GitHub will perform the line-ending conversion for the files matching the pattern.
eg.:
*.bas text eol=crlf
This will work when you download the repository as a zip file

However, it won't work if you download a raw file (the lines will remain as LF):

On a related note, assuming you are working with an old-school Windows specific codebase like a VB6
or VBA
project, you might also want to define the text encoding in case you have non-ASCII characters like "€", "©", "£", etc.
eg.:
*.bas text eol=crlf working-tree-encoding=CP1252
In my case, I'm using CP1252 which is the usual Windows code page for Windows OS in North American and Western Europe, but it might differ on your system. To get the number that goes after "cp" on your local machine, you can run the following Powershell command :
Get-WinSystemLocale | Select-Object @{ n='ANSI Code Page'; e={ $_.TextInfo.AnsiCodePage } }
source