0

Hi I have a dockerized project which I tried to run using docker desktop but I got the error

env: bash\r: No such file or directory

and searching through I found the solution, using dos2unix. https://github.com/TizenTeam/dos2unix

But using it makes my project to have about 215 changed files.

enter image description here

I want to know if there is any way to tell git to ignore those kind of changes since the content didn't really changed or if there is another way to fix the bash\r error

David Maze
  • 130,717
  • 29
  • 175
  • 215
H3lltronik
  • 562
  • 8
  • 26
  • 1
    You should look in more details into what sequence of actions lead to this error when you "run docker". For example : "running a container" generally involves running actions or scripts defined by you; if that failure comes from one of your scripts, perhaps you need to apply dos2unix on all text files that you copy to your container ? or on a specific set of files ? – LeGEC Sep 14 '22 at 05:09
  • 3
    You don't tell git to ignore these kinds of changes because adding or removing a character is still a change. However you should use something like what is described [here](https://stackoverflow.com/questions/170961/whats-the-strategy-for-handling-crlf-carriage-return-line-feed-with-git) once you've converted all line endings to prevent them from keep changing whenever you switch to different environments – apokryfos Sep 14 '22 at 05:45
  • 3
    Check your `core.autocrlf` in your git config, this can help to solve your pblm – Ôrel Sep 14 '22 at 11:52

0 Answers0