我们正在与几个拥有 Mac 的人一起开展一个项目,而我正在 Windows 上运行。我们遇到了换行符的一些问题。
我在 GitHub 上读到可以添加以下内容:
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
进入 .git 属性
但是我应该将该文件提交到 GitHub,以便其他使用 Mac 的人获得相同的设置吗?
如果重要的话,我们正在编写网站。(PHP、JavaScript 文件等)。
郑重声明,我是唯一一个使用 Windows 的人......所以,是的,我能做什么?