Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with line endings

David McGrath
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2018

Hi

I use bitbucket for CHEF development, and I have built a large repro with the default setting autocrlf = true by mistake. I Have made many commits and now have a large project. I develop in windows but the CHEF code is for linux boxes. I manually set the line endings for the linux config files held in the CHEF source so they work when used in linux. I commit from my local repro top the CHEF server.

Everything was fine until I checked out another copy of the repro and found that all the line endings were set back to CRLF because of the autocrlf = true.

I updated the repor settings to keep the line endings as they were ( autocrlf = false) which seems to be working for new commits. My question is how can I tell git to commit the files I currently have and not to change the line endings so next time I check out the repro the files that should have LF endings still do?

 

Thanks in advance

 

David

1 answer

1 vote
David McGrath
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2018

I managed to fix it myself :-)

I took a copy of the files from my original local repro (the ones with the correct line endings) and pasted them over the newly checked out copy of the repro where every line ending was set to LF as that how they had been stored in GIT.

As soon as I pasted over GIT then saw that each file had changed and allowed me to commit every file and now when I check out a fresh copy they have the correct line endings.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events