I recently switched from using Ubuntu on dual-boot to using it on WSL. I had a bash script that worked perfectly fine on Ubuntu, which I then cloned from a GitHub repo to windows. When I attempt to run the script in WSL I get the following error:
batch.sh: line 2: $'\r': command not found
How do I clone the repo using the windows installation of git such that newline character treatment is compatible with WSL?
Edit: This question was significantly rephrased to more accurately describe the problem.
git
issue. There are details in your answer that are crucial to this question, and with those details, the way this question is currently worded is no longer factually accurate.git
issue experienced, as @gronastaj laid out in their answer, due to options chosen duringgit
installation on Windows. It would be to the benefit of factual accuracy to swap out the bulk of the wording in this question with wording similar to that in your answer to make it factually accurate and applicable to what's been experienced.