git clone后直接显示修改的文件 [英] Files showing as modified directly after git clone

查看:615
本文介绍了git clone后直接显示修改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我有一个存储库问题,虽然我的git-fu通常很好,但似乎无法解决此问题。



当我克隆这个存储库时,然后cd到repo中,git-status显示已更改的几个文件。注意:我没有在任何编辑器或任何东西中打开回购。



我尝试了以下指南: http ://help.github.com/dealing-with-lineendings/ ,但这对我的问题没有任何帮助。



我试过 git checkout - 。多次,但它似乎没有做任何事情。



任何帮助/想法将不胜感激



更新1:我在Mac上,回购本身没有子模块。



更新2:文件系统是Mac上的Journaled HFS +文件系统,不区分大小写。这些文件是单行的,每个大约有79K(是的,你听到的权利),所以看看 git diff 并不是特别有用。我听说过要做 git config --global core.trustctime false 这可能会有所帮助,当我回到电脑上时, p>

更新3:用事实改变了文件系统的细节!并且,我尝试了 git config --global core.trustctime false 这个效果不好。

解决方案

我明白了。所有其他开发人员都在Ubuntu上(我认为),因此具有区分大小写的文件系统。但是,我不(因为我在Mac上)。事实上,当我用 git ls-tree HEAD< path>

查看它们时,所有文件都是小写的双胞胎

我会让他们中的一个把它整理出来。


I'm having an issue with a repository at the moment, and though my git-fu is usually good, I can't seem to solve this issue.

When I clone this repository, then cd into the repo, git-status shows several files as changed. Note: I haven't opened the repo in any editor or anything.

I tried following this guide: http://help.github.com/dealing-with-lineendings/ but this didn't help at all with my issue.

I have tried git checkout -- . many times but it seems not to do anything.

Any help/ideas would be greatly appreciated

Update 1: I'm on a mac, and there are no submodules in the repo itself.

Update 2: the filesystem is "Journaled HFS+" filesystem on the mac, and is not case-sensitive. The files are one-line and about 79K each (yes, you heard right) so looking at git diff isn't particularly helpful. I have heard about doing git config --global core.trustctime false which might help, which i will try when i get back to the computer with the repo on it.

Update 3: changed details of filesystem with facts! and, I tried the git config --global core.trustctime false trick which didn't work very well.

解决方案

I got it. All the other developers are on ubuntu (i think), and thus have case-sensitive file systems. I, however, do not (as I'm on a mac). Indeed all the files had lowercase twins when I took a look at them using git ls-tree HEAD <path>.

I'll get one of them to sort it out.

这篇关于git clone后直接显示修改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆