刚刚克隆了this,目录中的目录会立即发生变化吗?
我从未遇到过这样的事情,我很好奇为什么会这样?以及如何做到这一点?
更新:
我使用git clone git://github.com/horndude77/open-scores.git
克隆了回购,并在运行git status后立即显示:
git status
# Not currently on any branch.
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: SaintSaensRomanceOp36/defs.ily
# modified: SaintSaensRomanceOp36/horn.ily
#
no changes added to commit (use "git add" and/or "git commit -a")
git diff揭示:
warning: CRLF will be replaced by LF in SaintSaensRomanceOp36/defs.ily.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in SaintSaensRomanceOp36/horn.ily.
The file will have its original line endings in your working directory.
diff --git a/SaintSaensRomanceOp36/defs.ily b/SaintSaensRomanceOp36/defs.ily
index 07e09ac..c7961be 100644
--- a/SaintSaensRomanceOp36/defs.ily
+++ b/SaintSaensRomanceOp36/defs.ily
@@ -1,47 +1,47 @@
-\version "2.13.13"
.
.
.
注意:只包括差异的顶部,因为它很长。
当我克隆存储库时是否删除了CRLF字符?如果是这样,这些字符是如何包含在bigin的提交中的?
答案 0 :(得分:5)
克隆存储库时,会自动删除在Windows计算机上进行提交时包含的CRLF字符。然后Git会检测到此更改,因此在用户完成除git clone
以外的任何操作之后立即修改存储库。
我通过从* text=auto
文件中删除.gitattributes
来解决此问题。
答案 1 :(得分:2)