My team are building our first docker based .NET app and have written a bash script that runs as part of the build process (from the dockerfile). We are all on Windows 10 machines.
When the bash script runs, it throws an error:
/bin/bash^M: bad interpreter: No such file or directory.
From my research, this appears to be because of line endings being Windows line endings, not UNIX based. I was able to fix this by converting the endings using Notepad++ and the script ran fine. However, when I went into SourceTree to see the changed files, it briefly showed as a changed file (with something saying it couldn't detect changes). Once I clicked the stage file button, it disappeared as if there wasn't any changed files.
How do I resolve this? I can see a line endings setting in GIT but not sure what the right setting should be.