Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line ending issue (CRLF) inside repository #21

Closed
paulvi opened this issue Oct 11, 2013 · 3 comments
Closed

line ending issue (CRLF) inside repository #21

paulvi opened this issue Oct 11, 2013 · 3 comments

Comments

@paulvi
Copy link
Collaborator

paulvi commented Oct 11, 2013

Continue subtopic in #19 as separate issue

I wrote a program to investigate the line ending issues, and it appears there are a mixture of Linux- and Windows- style endings in the project. Things start to go wrong when merges are attempted AFAICS. This issue is a can of worms and I'm not sure really the right way forward, and I don't see any concensus on the net, .e.g. http://stackoverflow.com/questions/2825428/why-should-i-use-core-autocrlf-true-in-git

I don't remember about the value for core.autocrlf, I just remmeber that

  • on git server line ending should be Linux style
  • on Windows PC line ending should be Windows style
@satyagraha
Copy link
Owner

I think these two articles show the best way forward:

It is required that:

  • on Windows, .cmd files must have CRLF termination
  • on Linux, .sh files must have LF termination

and it is not uncommon for a single project repo to have files of both these types. Therefore the approach using .gitattributes is likely to be the best. Thankfully, Eclipse correctly preserves the line ending style of any text file it encounters.

@paulvi
Copy link
Collaborator Author

paulvi commented Oct 16, 2013

👍 having configuration inside repository and not depend on git global setting is great.

@satyagraha
Copy link
Owner

Fixed in 1c3e5e6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants