I am working on a project and I use git for version management. The problem I have is that if I change the permissions of the directory, they appear to me that the files were modified, but when I use git diff
to observe the changes, a list like the following appears:
diff --git a/assets/images/icon-32-bcache.png b/assets/images/icon-32-bcache.png
old mode 100644
new mode 100755
diff --git a/assets/images/icon-32-help.png b/assets/images/icon-32-help.png
old mode 100644
new mode 100755
I consider these changes garbage to be in a commit. Is there a command that ignores these changes?
To ignore permission changes in git , it is done with:
More information in Manual GIT Config :
Similar question: How do I make Git ignore file mode (chmod) changes?
To ignore file permission changes, you should run:
As I see that you are not interested in these changes at all, you can make this configuration global (that is, for all the repositories of your user):
References: