I have been working on projects with Git for over a decade.
I'm primarily a Windows user.
This shouldn't be a problem.
For the first time ever, this year, I have been having a lot of trouble with line endings. When I check files out, Git was converting all the line endings to windows based line endings (CRLF), even though the Repo has linux based line endings (LF).
Recommitting would change the line endings back to LF, so there was no issue for my mac based colleagues.
However, Docker was having a ton of issues w/ the line endings. I'd have to go manually change line endings inside IntelliJ for any of my docker images to build and work properly. You can do this with an option in the bottom right of IntelliJ

And that fixed everything. I've been working Docker for over 5 years, so why have I never had these issues before? I honestly have no idea, but I did find a fix. There is a git property named autocrlf that helps this.
This property can have three values:
- false: If set to false, no line ending conversions are needed.
- true: If this property is set to true, then when you checkout, line endings are converted to crlf. When you commit, line endings are set back to lf
- input: If the property is set to input, then crlf line endings are set to lf when you commit a file, but no conversion happens on checkout.
Even though I'm a Windows user, I use IDEs that can support any line ending, and I do not need Windows specific line endings ever.
I ran this command to change the value globally, I suddenly started having less issues.
And the world is happy again.
