I have some .sql files that I just for the first time pushed to github. However when I look at the commit it is saying:
BIN WebRole/Sql/Database.sql Vi
Using the accepted answer from the linked question and a few other comments I came up with this as a solution to the issue, which is working and runs on Win10
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
Get-ChildItem -Recurse *.sql | foreach {
$MyPath = $_.FullName;
$Contents = Get-Content $MyPath
[System.IO.File]::WriteAllLines($MyPath, $Contents, $Utf8NoBomEncoding)
}