Git: convert carriage return \r to new line \n with git hook?

后端 未结 2 572
挽巷
挽巷 2021-02-15 17:00

A fellow coder uses a Windows computer that is putting carriage returns everywhere in our source.

Is there a way to write a git hook that converts all \\r\\n

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-15 17:35

    If they're using TortoiseGit, there's an option to do this for you, under Git->Config->Auto CRLF convert.

提交回复
热议问题