How do tell GIT not to change the line endings in a File?

A bit earlier I wrote about creating a Docker Image and it trying to interpret the line endings as a command to run inside the docker image. I fixed it by changing the line endings on the file.

However, it turned out the problem was an issue with my Git setup. By default, when I installed Git on Windows, it was configured to modify line endings from whatever was in the repository to Windows Line Endings--which include a carriage return and line feed.

Most Linux, or Mac, users only use a line feed.

You can reset your Git settings to maintain the line endings:

view plain print about
1git config --global core.autocrlf false

This was the best way for me to solve this.

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

Comments are not allowed for this entry.