LF would be replaced

My first attempt at Push I get "LF would be replaced by CRLF in PixelEtherMega.ino" . An INO file is source code for the Arduino.

What do I do with it???

4 answers

Hi James,

In Windows a line ending is represented by CRLF, and in Unix systems it's represented by LF. The push is just warning you that your line endings are going to be replaced for that file. It sounds like you're working between both Windows and Linux/Mac on your repository.

This can be disabled if you want by setting autocrlf to false so it doesn't convert the line endings on push. This can be done at the command line / terminal when browsed to your repository location by calling the following:

git config core.autocrlf false

Hope that helps

Kieran - Still a problem.

To be sure I uninstalled GIT completly and reinstalled SourceTree. I still get the same error message. BTW its not a warning its game over error.

I had installed SourceTree with GIT internal this time. So now there is no way to run git config core.autodrlf false its not on my computer anymore. Any other ideas?

It sounds like this should be a configuration option in SourceTree don't you think?

OK - I found my way into MINGW32 via your Terminal icon (I didn't know it had been installed) but it does not have a 'config' option in it.

Now I found my way to git config but when I enter:

git config core.autocrlf false

I get back:

"Error encountered dialog" with the message 'Summary' failed with code 128: fatal:bad config value for 'core.autocrlf' in .git/config

I re-installed SourceTree but this time I unchecked the box that said "use default line endings".

This time it worked.

Confusing things these LFs

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

274 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot