我可以让git diff忽略权限更改 [英] Can I make git diff ignore permission changes
本文介绍了我可以让git diff忽略权限更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用类似于:
tar - 生成czf deploy.tar git diff - 仅命名v1 v2
一个tar与两个标签之间的修改文件,问题是,现在因为权限的改变,几乎所有我的树都被列为修改过。
有没有办法让我可以告诉 git diff
忽略那些只有权限发生变化的文件?
这会告诉git忽略权限:
git config core.filemode false
I unadvertedly change the permissions of my entire tree and commit that change alone with other content changes.
I use something like :
tar -czf deploy.tar git diff --name-only v1 v2
to generate a tar with the modified files between two tags, the problem is that now because of the permissions change almost all my tree is listed as modified.
Is there a way that i could tell git diff
to ignore those files which only has the permissions changed?
解决方案
This will tell git to ignore permissions:
git config core.filemode false
这篇关于我可以让git diff忽略权限更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文