When I run git status
, many files are modified:
$ git status
On branch feature-branch
Your branch is up to date with 'origin/feature-branch'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file1.txt
modified: file2.txt
modified: file3.txt
...
Is there a way to show that these files only changed their permissions (mode), not contents? I imagine the output would be something like this:
$ git status
On branch feature-branch
Your branch is up to date with 'origin/feature-branch'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file1.txt (100644 → 100755)
modified: file2.txt (100644 → 100755)
modified: file3.txt (100644 → 100755)
...
I am aware of git diff
that will show something like this:
diff --git file1.txt
old mode 100644
new mode 100755
but I'd prefer if git status
was showing me this already.
Note: This question seems similar but in that case, git status
was not detecting mode changes at all. In my case, files are marked as modified but I'd like to distinguish plain file edits (modifying content) from just changing permissions.