今天在git提交代码的时候,并无对修改文件,可是提示我更新。我使用git diff
查看了一下:python
[root@localhost doc]# git diff python/en/whatsnew/index.rst diff --git a/python/en/whatsnew/index.rst b/python/en/whatsnew/index.rst old mode 100644 new mode 100755
发现文件是由于权限的改变而致使我须要提交文件。感受这种东西特别麻烦。对我来讲不须要。不知要git为何要把这个文件权限也放到了版本管理中。很奇怪。
可是老是会有办法的,
咱们能够使用以下方法让git忽略文件权限,执行如下命令git
git config core.filemode false
而后咱们再次查看的时候。就没有问题了。shell