Ignore line endings in Deployment -> Sync with X
I use PhpStorm "Sync with" to sync my work with a Linux based development server.
In the office I use a Linux desktop, but sometimes I work from home on my Windows desktop. Whenever I move from one machine to the other I end up having to sync all my files, as the sync always says all files have differences in line endings - so I can't tell which are genuinely different, and which are just different in line endings.
Sync can ignore whitespace - is there a way to get it to do the same with line endings?
请先登录再写评论。
Hi there,
There is no such option, AFAIK.
Maybe you should use VCS -- they have options to automatically convert line endings or ignore them.
AFAIK -- NO. It can only hide whitespace differences while still showing file as being different -- http://youtrack.jetbrains.com/issue/WI-18798
----
Why don't you set up persistent code style instead?
Now just "Code | Run Inspection by Name = Inconsistent line separators" -- you will see list of all files that have different line endings and can fix them all from there.
Thanks. I already had Line separator for new files set - but that didn't stop all my files from Git being converted when they were checked out.
I've run the inspection as you suggested, and it converted a bunch of files - unfortunately now I have 3000+ files that need to be recommitted to Git - even though Git is set to ignore file endings.
It also left about 2000 files untouched, so I still have to wade through those every time.
I've run out of time to fix this - I need to do some work - but I'll try to pick it up again, maybe commit those files with the new line endings and see if that fixes it.
Thanks anyway.
So I've been running into this problem for quite a few years now and I have to ask:
"why doesn't JetBrains just update the Content compare while doing Deployment Sync to optionally ignore line endings?"
It seems like something you'd give to an intern that has 5 minutes to spare. Is this secretly more complex than it seems?
There are a lot of us that run on Windows machines and that deploy to X servers.
Please add this!
Thanks.
Here's a corresponding feature request: https://youtrack.jetbrains.com/issue/IDEA-101502
Please vote for it to move it up in a queue and receive notification regarding progress.