Questions tagged [line-endings]

Line-ending signifies end of line. Depending on operating system line-endings are different.

465 questions
47
votes
4 answers

Automatic EOL conversion in Eclipse

Need to keep EOL format consistent in all resources under Eclipse workspace. I know about Eclipse preference that sets new line style for newly created files, but I would like to have automatic conversion for already existing files. Is there some…
Ilya Ivanov
  • 2,001
  • 1
  • 19
  • 22
46
votes
3 answers

Definitive recommendation for git autocrlf settings

I use Windows, Mac OS X and linux on a daily basis. I use git in all these environments, pulling from repos that are used by folks with different choices for line endings. Are there definitive recommendation for setting core.autocrlf in my…
rbellamy
  • 5,276
  • 6
  • 34
  • 45
44
votes
3 answers

Python 2 CSV writer produces wrong line terminator on Windows

According to the its documentation csv.writer should use '\r\n' as lineterminator by default. import csv with open("test.csv", "w") as f: writer = csv.writer(f) rows = [(0,1,2,3,4), (-0,-1,-2,-3,-4), …
wierob
  • 4,159
  • 1
  • 23
  • 26
40
votes
20 answers

How should I Fix "svn: Inconsistent line ending style"?

When I run "svn propedit svn:ignore ." at the root of my svn repository, I get this error: svn: Inconsistent line ending style I have tried to run this script: http://blog.eflow.org/archives/130 which runs dos2unix and sets the eol-style on all of…
Kelvin
  • 965
  • 2
  • 10
  • 13
38
votes
1 answer

PhpStorm saving with Linux line ending on Windows

Environment: Windows + PhpStorm Issue: PhpStorm saves file with Windows line endings - and for shell script it's issue so there is need to always convert after copying to server. Question: Is possible to configure PhpStorm to save file with Linux…
Jurosh
  • 4,167
  • 5
  • 32
  • 50
38
votes
8 answers

How can I normalize the EOL character in Java?

I have a linux server and many clients with many operating systems. The server takes an input file from clients. Linux has end of line char LF, while Mac has end of line char CR, and Windows has end of line char CR+LF The server needs as end of line…
bilal
  • 615
  • 1
  • 9
  • 16
37
votes
1 answer

What is the meaning of ^M in git diff

I am diffing a file between forked and upstream BitBucket repos: $ git diff origin/branchA..upstream/branchB -- some/file/path.xyz It seems to return the same difference for almost every file: -@using Sitecore.Mvc +@using…
Dennis Subachev
  • 2,259
  • 4
  • 18
  • 38
35
votes
8 answers

What's the difference between \n and \r\n?

They both mean "new line" but when is one used over the other?
Emanuil Rusev
  • 31,853
  • 50
  • 124
  • 193
34
votes
4 answers

Historical reason behind different line ending at different platforms

Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix? And now that Mac OS X is Unix (-like), did Apple switch to \n from \r?
Imran
  • 76,055
  • 23
  • 93
  • 124
34
votes
6 answers

git line endings - can't stash, reset and now can't rebase over spurious line endings commit

I have a repo I added a gitattributes to it and was working on it fine. I sync it via dropbox to another machine. When I opened it to the other machine a bunch of files suddenly appeared on the unstaged area as total diffs (all the file a huge diff…
Mr_and_Mrs_D
  • 27,070
  • 30
  • 156
  • 325
29
votes
2 answers

Cherry-pick with ignore whitespace / line-endings

is there a way to tell git cherry-pick to use the renormalize merge strategy? I'm not sure the -X option is working. I have a bunch of commits that seem to assume one type of line ending, and I'm trying to apply them to a branch that assumes…
hwjp
  • 13,059
  • 6
  • 66
  • 68
26
votes
4 answers

What does "!eol" in gitattributes do?

Recently I came across the following entry in a .gitattributes file: "* text=auto !eol" What does !eol do?
user3226810
  • 269
  • 3
  • 3
25
votes
1 answer

How can I get Git to truly *ignore* line endings?

How can I tell Git to truly not care about line endings? To leave them as LF or CRLF, as they originally were, and check them in the same way? I'm using a Git repository with git-tf to check in to a TFS repository. The rest of my team is using TFS…
Ryan Lundy
  • 187,365
  • 35
  • 174
  • 206
21
votes
4 answers

Maven release plugin and windows line breaks

when i try to run the maven-release-plugin it changes the version in the pom.xml file. Prior to the maven release every line ending has unix style but after running it on my windows machine, the plugin changes every line in the file to…
realsim
  • 1,036
  • 2
  • 11
  • 22
20
votes
3 answers

How to see what type of line endings are already in git repository?

First of all, I'm not asking what does it mean or how to change it. The thing what interest me most is: how can I see what's already in repo? What type of line endings. I have my repositories on github and bitbucket. Thanks for help
Ivan Bara
  • 255
  • 1
  • 3
  • 7
1 2
3
30 31