I'm trying to programattically create a file using Powershell (I know, noob stuff) with multiple lines of content.
My attempt is as follows:
$ServicesYaml = @'
$ServicesYaml | Out-File -FilePath .\services.yml
This is a clash of linuxy nature of GIT and Windows text file byte order mark. The Out-File commandlet uses a Windows encoding (USC-2 LE BOM) that GIT does not supports and GIT treats the file as binary instead of text. Try using Set-Content commandlet which uses UTF-8 without BOM
$ServicesYaml = ' parameters: twig.config: debug: true auto-reload: true cache: false ' $ServicesYaml | Set-Content -FilePath .\services.yml