我们正在开发一个项目,有几个人拥有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
Run Code Online (Sandbox Code Playgroud)
进入.gitattributes
但是我应该将该文件提交给GitHub,以便其他Mac用户获得相同的设置吗?
如果重要,我们正在编码网站.(PHP,JavaScript文件和东西).
为了记录,我是唯一一个拥有Windows的人...所以是的,我该怎么办?
我补充说:
# 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
Run Code Online (Sandbox Code Playgroud)
并将其提交给GitHub服务器.所以每个人都解决了这个问题.