操做系统平台协同开发时 GIT 的注意事项: 不一样操做系统中的换行符(不要使用git的换行符

PS: 最好的解决方案是执行如下步骤:(好比,有一个 git 库叫作 mygitrepohtml

1)增长 .gitattribute 文件git

在mygitrepo 下创建一个 .gitattributes 文件,在其中输入 github

    * text eol=lf web

,详见https://help.github.com/articles/dealing-with-line-endings#platform-all编辑器

2)经过你的客户端命令行修改换行设置,输入spa

    git config --global core.autocrlf false命令行

    git config --global core.safecrlf trueorm

3)经过你的客户端命令行输入 htm

    git add .gitattributesblog

    git commit .gitattributes -m "commit .gitattributes"

4)项目组统一编辑器和 IDE 的换行符,推荐 UNIX 风格的 LF

其余相关资料连接:http://blog.sina.com.cn/s/blog_64e1046201019yuh.html

相关文章
相关标签/搜索