Line endings with cygwin and Github for Windows

后端 未结 3 819
[愿得一人]
[愿得一人] 2021-02-15 02:14

I\'m want to be able to work on my git projects using both the Github for Windows application as well as git in the command line using Cygwin (on Windows).

But I keep o

3条回答
  •  醉梦人生
    2021-02-15 02:36

    I cloned a repository (with files with CRLF) on my windows using GitHub 2.7.0.24. Then I wanted to use my cygwin's git version 2.1.4 on it.

    I edited .git/config by adding "autocrlf=true" under the [core] section. (With a real tabulation before "autocrlf=true")

    Now cygwin's git says I'm up to date with no modifications.

    I keep the CRLF on the files because they were created that way on the original repository.

    I will not use the GitHub application anymore...

    I noticed the merge conflicts are adding <<<< ==== >>>> lines with no CR, but they will be deleted when I resolve the conflicts.

提交回复
热议问题