NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Git and line endings


Joined: 27 Nov 2009
Posts: 67
Reply with quote
I am using the latest PhpED IDE on Windows and have set it up where both the web server as well as all project files are located on the remote Linux server. Since the project files are located on the remote server, the git repository is located there as well. I am not using any of PhpEd source control and perform my adds and commits to the repository manually. I am collaborating on a project and was asked to do the following by someone who did not know my specific PhpEd configuration.
Quote:
git config --global core.autocrlf true
git config --global core.safecrlf true
git config --global core.eol lf


Since doing so, I can not make commits due to the following error:
Code:
warning: LF will be replaced by CRLF in setup/setup.txt.
The file will have its original line endings in your working directory.


I have researched the error (https://help.github.com/en/articles/dealing-with-line-endings) and understand why it is occurring, but not how best to deal with it. For one, looks like I need to set core.autocrlf to false. Anything else? What about settings to PhpED? For instance, IDE settings "Default file endoing", "default file format", etc?

Thanks
View user's profileFind all posts by NotionCommotionSend private message


Joined: 27 Nov 2009
Posts: 67
Reply with quote
I think I have it figured out but would like some confirmation.

I first need to ensure that all my files have a single <LF> since they live on Linux and not a <CR><LF>. I then need to ensure that future files are saved that way by choosing "Unix" on PheED's Settings->IDE settings->Default file format, and since PhpED is running on windows but uses files on Linux, I do not want to chose Autodetect.

Then, for git, I want:

Code:
git config --global core.autocrlf input
git config --global core.safecrlf true
git config --global core.eol lf


Agree? Thanks
View user's profileFind all posts by NotionCommotionSend private message
Git and line endings
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic