Seems git setup wizard for Windows presents a choice of few options for line end conversion and the default is to have autocrlf which is messing up the files on checkout.

I'd suggest if possible to configure that parameter to false: `git config --global core.autocrlf false`. Then files should stay intact after cloning a repo. If eol conversions are needed for some repository - this can be configured on local level (i.e. in `.git/config`).