Git: fix linebreaks in file (autocrlf was working fine, but one file seems to have gotten stuck)

StackOverflow https://stackoverflow.com/questions/15145498

문제

I’m collaborating cross-platform via github, and up till now, autocrlf has been doing a beautiful job of transparently managing our line break formats.

However, after a recent manual merge, one file ended up with a mix of CR and CRLF endings, and since then it has seemed to be “stuck” in that state — I’ve pushed it and checked out my local copy of it a few times, but it still retains the mixed line breaks.

How can I ask autocrlf to start handling this file again? (From reading around, if I understand right, manually fixing the linebreaks in my editor would explicitly show up in the next commit, and so would obscure the file history — so I would prefer to avoid this if possible.)

도움이 되었습니까?

해결책

If the mixed linebreaks have gotten into the repository there is no other way than manually fixing them and creating a history entry for that change.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top