I have a repository with a submodule. For me, this submodule is read-only, so I'm using submodule.Module.ignore=dirty.
This works fine for 'git status', but when I commit, the whole submodule is scanned and in git's comments I can see that it's dirty.
Is there a way to avoid this?
If you really never want to see changes to the submodule, you can add a line to .git/info/exclude inside the submodule with a '*' pattern.
This will result in the submodule always reporting itself as clean, regardless of what has changed.
echo "*" >> path/to/submodule/.git/info/exclude
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With