I am using Github and TeamCity.
The line breaks of txt files don't exist after committing them to Github,
what can I do in order to keep these line breaks in txt files?
When I am using notepad++ to view these files- the line-breaks appear,
but when using Windows notepad there are no line breaks.
I googled for a solution and I found that if add a new file in the root directory
.gitattributes that will contain:
*.txt crlf
tried also
*.txt eol=crlf
it will solve the problem, so I committed it to Github and then tried to download the txt file again, but it still don't show the line breaks.
What else can be done? how can I be certain that Github is using the .gitattributes that I added? cause it don't seem to use it.
To solve that issue I ended up adding .gitattributes file to the root folder of the project with this content:
# Windows-only files
*.txt text eol=crlf
But this only handle the problem in Github, I use Github and also TeamCity
So when I downloaded the text file through TeamCity, the file EOL was not set to CRLF
in TeamCity this checkbox need to be checked also (its in the VCS):
