title: In git, how can I remove Windows line endings from changed lines only?
body: <p>Sometimes when I'm trying to contribute code to an open source project, the project has not been formatted and contains both UNIX and Window line endings. My "smart" IDE will somehow detect which type of ending to use for each file, and if it detects Windows line endings, then all my changes will have Windows line endings (shown as <code>^M</code> in <code>git diff</code>). How can I remove these Windows line endings from only my changed lines and not the whole file?</p>