The issue is Git converted line endings to Windows format, and now you have extra carriage returns (^M).
- Configure Git not to convert line endings on checkout by running
git config --global core.autocrlf input
- Delete your local repository.
- Clone it again.
For more info on how Git deals with line endings, see Formatting and Whitespace