【问题标题】:Sharing a git repository between OS/X and Windows在 OS/X 和 Windows 之间共享一个 git 存储库
【发布时间】:2012-07-27 07:21:17
【问题描述】:

我有一个存储在 Dropbox 文件夹中的 git 存储库,用于在运行 OS/X 和 Windows 的系统之间进行同步。

由于 OS/X 使用换行符 (LR) 换行符,而 Windows 使用回车和换行符 (CR+LF) 每当我在机器之间移动时,我看到一堆非内容更改,它们只是修改换行符字符。

有什么好的方法来解决这个问题吗?我可以告诉 git 忽略换行符修改吗?

【问题讨论】:

    标签: git version-control newline


    【解决方案1】:

    GitHub 有一篇关于此的有用文章:

    https://help.github.com/articles/dealing-with-line-endings

    一般来说,他们建议在 Windows 上使用 git config --global core.autocrlf true,在 OS X 上使用 git config --global core.autocrlf input

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-25
      • 1970-01-01
      • 2016-05-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多