You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every project should have its newline settings defined in .gitattributes to avoid a mess of windows and unix newlines. There's an added benefit of using .gitattributes to simplify your git diff output by defining big generated files (for example composer.lock) as binary.
BTW this project doesn't have a .gitattributes file either 😆
The text was updated successfully, but these errors were encountered:
To see which line endings are in the Git index and in the working copy the following command can be used: git ls-files --eol
First column is the Git index (which should be for this project all i/lf)
Second column is the working copy (which depends on your platform, for Windows there will be crlf, for *nix there will be lf)
Third column are attributes for the file.
Git additionally provides .gitattributes file to specify if some files need to have specific line endings on all platforms (either CRLF or LF).
Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion if core.autocrlf=true is set on Windows and user have CRLF newlines in all files in the working tree.
Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines. So, I wouldn't add a specific .gitattributes in this project regarding the new lines.
Every project should have its newline settings defined in
.gitattributes
to avoid a mess of windows and unix newlines. There's an added benefit of using.gitattributes
to simplify yourgit diff
output by defining big generated files (for examplecomposer.lock
) as binary.BTW this project doesn't have a
.gitattributes
file either 😆The text was updated successfully, but these errors were encountered: