Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Warning message when I use the git add medals.html command

So I followed the video and typed in the command as follows (pasted content) and this warning message shows up -

$ git add medals.html warning: LF will be replaced by CRLF in medals.html. The file will have its original line endings in your working directory

It still seems to be working, but i have no clue what this warning message means.

1 Answer

This message is referring to the invisible characters at the end of each line in the file. LF stands for Line Feed, and CRLF stands for Carriage Return Line Feed. Depending on your file system, the default line endings are either LF or CRLF. Usually, Linux and Mac default to LF and Windows defaults to CRLF. The line ending doesn't have much impact on most things, but if you are using certain scripts or other ways of programmatically reading a file, they can cause issues. If you want to see which line endings your files are using, you can open them in a text editor like Notepad++, then go to View --> Show Symbol --> Show End of Line. At the end of each line, you should see either a 'LF' or a 'CRLF'

I'm not sure if that answers your question, but I hope it helps.