Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Introduction to Git First Commits Staging Changed Files

Git Bash for Win warning I am getting on git add.

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

1 Answer

Rune Andreas Nielsen
Rune Andreas Nielsen
5,342 Points

Hi Christopher,

In Unix systems, the end of a line is represented with a line feed (LF). In windows, a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). So git is warning you because it will replace the LF with CRLF because you're working on a windows machine.

It should not matter much to you if you're working alone and you're just learning.

If you don't want to deal with the warning all the time you can read the documentation about formatting and whitespace https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Formatting-and-Whitespace

  • Rune


Thank you! That explains it for me. I did figure out how to turn the warning off.