Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using CentOS Linux 5.8 as a web server and tortoise SVN for synchronizing version of our code. We write the code in Windows 7 professional 64BIT with NetBeans and NotePad++.

I'm committing the code files (.php) from the Linux Shell by this command:

svn co svnFolder serverFolder --username **** --password ****

The problem is, after committing the files, when I'm opening them directly from the server (for debugging) by NotePad++ (I'm doing View/Edit from Filezilla) I have extra blank lines.

A code that looks like this on the localhost (On NotePad++):

private $producer;
private $account;
private $admin;

private $producerEvents;
private $accountProducers;
private $adminAccounts;

Will look like this after committing to the server (Again, on NotePad++):

private $producer;

private $account;

private $admin;

private $producerEvents;

private $accountProducers;

private $adminAccounts;

If I upload files by FTP, No blank lines are being added.

How can I solve it ? Thanks.

share|improve this question
By the sounds of it, your line-endings are being confused. What line-ending setting are you using in Notepad++? – Jay Jun 10 '12 at 12:34
up vote 2 down vote accepted

You're committing the files with CRLF endings from the Windows system - which will generally cause no problems, but it's a bit 'abnormal' on your Linux system. Text editors won't normal display the double-space like that - I suspect that's because of the access method via Filezilla.

Since your files are being accessed by systems with both line ending types, the best approach would be to have SVN enforce the line ending style.

Use TortoiseSVN's property editor on the files (or in recursive mode, on a directory) that you're working with. Add the svn:eol-style property.

  • Set it to LF if you want the Linux-style LF endings to be used everywhere (Notepad++ will work just fine with this, but if you open the file in something like notepad.exe, it'll think it's all one line),
  • or set it to native, which will cause the checked-out copies on each system to have their native line ending style.

The property is set on individual files, so make sure you add the property to any new files that are created after you put the property in place.

share|improve this answer
Thanks for the help, I will check it on the next check-out and report back... – Alon_A Jun 10 '12 at 20:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.