Git: can I suppress listing of ‘modified content’/dirty submodule entries in status, diff, etc?

There is even a possibility to set the ignore mode for every added submodule within the .gitmodules file.

Just today I encountered this problem and immediately wrote an article in my blog about it after finding a solution: How to ignore changes in git submodules

The gist of it:

Once you added a submodule there will be a file named .gitmodules in the root of your repository

Just add one line to that .gitmodules file:

[submodule "bundle/fugitive"]
    path = bundle/fugitive
    url = git://github.com/tpope/vim-fugitive.git
    ignore = dirty

Leave a Comment