English 中文(简体)
转移储存库后宽松报告方式的变化
原标题:git diff reporting mode changes after moving the repository
  • 时间:2012-01-12 22:15:12
  •  标签:
  • git

我把我的一组宝库转移到另一个非洲顾问办公室,复制到外部的硬盘。 现在,当我填写<代码>git diff时,它报告所有档案方式都发生了变化。

diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.npmignore b/.npmignore
old mode 100644
new mode 100755
diff --git a/.travis.yml b/.travis.yml
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755

我对档案许可没有真正了解,我应该做些什么?

如何改变模式? 改变所有不可执行档案的模式? git reset?

最佳回答

或许,你的外部硬盘 drive有不同的档案系统,不尊重原始档案许可。 在承诺之前,我只是亲自纠正。

例如,FAT32, 通常用于USB thumb 驱动器,但并不支持执行许可。 当你将FAT32档案系统的一份档案复制到一个正常的不像同事实一样的档案系统时,它通常会对所有档案进行许可,因为所有档案的损坏程度低于将其撤销。

如果你想要保留这种信息,不要把档案直接复制到汽车上;相反,将文件(按意压缩)归档,然后在另一端不包装。 固定格式的确能够跟踪“九”许可范围。

请注意,git本身并不跟踪可诉可诉可诉的抗辩。 如果模式变化是唯一的区别,而且你不想重述所有内容,那么,你可将<条码>git diff的产出变成所有受影响档案的<条码>chmod-x。

问题回答

你们可以适用这一规定。

git config core. 文档格式假

导致忽视档案中的差异。

这一解决办法见another问题





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签