user1816481
user1816481

Reputation: 107

Git push corrupting my export with '\r' characters

Whenever i push through git all my bash scripts seem to be corrupted with the \r character. It doesn't affect the code, but it just adds a significant amount of noise to my work. Looked all over the web, but can't seem to find a solution.

Example:

    echo "*************************************************************************"\r

                                                                                     ^

Every line in my bash scripts are always ended with this special character. I use STS on Windows 7. Any ideas?

Upvotes: 2

Views: 668

Answers (1)

kisp
kisp

Reputation: 6552

Put this two lines into your .gitconfig file in the root of your repo or into your home if you need to make this settings global :

[core]
   eol = lf

You can find more about this here : https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

Upvotes: 1

Related Questions