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 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,354 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

Rune,

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