Deploy changing newlines on external server
When I do a Ctrl+S (deploy to server), git keeps reporting that the entire file was changed, and I think PHPStorm is changing the line endings though I'm not seeing how to fix it. It's only happening on certain files which I think were saved with different line endings from other developers, but the problem is only happening from my PHPStorm deploy.
By the way, I've already troubleshot git, tried `git config --global core.autocrlf true` etc. If it helps, we're using Windows computers going to a Linux server, though previous developers would save willy-nilly the line endings however their software saved it directly to the server (they didn't use git or PHPStorm).
请先登录再写评论。
Hello,
PhpStorm can change only local files line separators according to File | Settings | Editor | Code Style settings.
Were any specific changes introduced to these certain files? Like case-only renaming?
Which setting? There's nothing in there about changing the line-ending type (LF/CR/CRLF), which is what's happening when it deploys to the server (git shows all lines are changes, and other editors only say the line endings are different).
> Which setting?
File | Settings | Editor | Code Style > Line Separator
> git shows all lines are changes
This looks more like a Git routine. Did you try to save and upload these certain files manually via another software?
My Line Separator setting is "System-Dependent"; again I'm on a Windows computer deploying to a Linux server through PHPStorm. Doesn't "System-Dependent" auto-save the file locally from my PHPStorm with CRLF (Windows)? Does that mean the Deploy will copy the file directly to the Linux server or write the file there with LF? I can find a way to check whether the Linux file is using LF or not (unless you recommend something).
I'm not sure what you mean by a Git routine. Like I've been saying, I'm deploying the file from PHPStorm (Ctrl+S Eclipse-style, or right-click manual upload), nothing else.