为什么我的所有索引都在我的git项目中发生变化 [英] why my all index is change in my git project

查看:118
本文介绍了为什么我的所有索引都在我的git项目中发生变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GitLab作为我的项目存储库。

从过去几周我没有提交我的项目,因此我只是编码器。

现在当我尝试提交我的项目,它显示我的所有文件都做了任何更改。

所以我试着 git diff 命令:这里我附上我得到的结果的屏幕截图。这清楚地表明,所有的索引文件已被更改。

我试过谷歌来解决问题,但是我失败了。

所以最后我在这里得到解决方案。我不想提交我的所有文件

解决方案

对于文件权限模式,再次克隆您的回购:

  git config --global core.filemode false 

然后从你的新克隆回购中,做一个

  git --work-tree = / path / to / old / clone / repo add。 

这会将您的实际更改导入到新克隆的回购中。






如果您想保留当前的回购(及其更改),您可以看到与 git diff ,正如我在此答案中所述。

请注意自从Git 2.9.1 之后,你可以用


  git add --chmod = -x。 


I am using GitLab for my project repository.
From past few week I have not committed my project hence I was only coder in it.
Now when I am trying to commit my project, it shows me that my all file has made any kind of changes.

So i try git diff command: here I am attaching screenshot of what result I got. It is clearly show me that all index file has been changed.

I had tried google to solve problem but I failed in it.
So finally here I am to get solution. I do not want to commit my all files

解决方案

For file permission mode, clone again your repo after:

git config --global core.filemode false

Then from your new cloned repo, do a

git --work-tree=/path/to/old/cloned/repo add .

That will import your actual changes into the new cloned repo.


If you want to keep your current repo (with its changes) you can see the difference with git diff, as I mentioned in this answer.
Note that since Git 2.9.1, you can change the permission of a file with

git add --chmod=-x .

这篇关于为什么我的所有索引都在我的git项目中发生变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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