2

Is there a global .gitconfig setting that allows to change the default of the ignore-submodules option from "all" to "dirty", "untracked", or "none"?

ahmex
  • 65
  • 4

1 Answers1

2

From git config:

diff.ignoreSubmodules is supposed to override any 'submodule.<name>.ignore' settings.
And it sets the default value of the --ignore-submodules command-line option.

However, Allan Jensen reports (in 2019, nine years later) that feature as not working, and proposes a patch, shown in this diff.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    How does that look in the config file? When I use "git config --global" it doesn't seem to write anything to my ~/.gitconfig file. Typing "git status" still shows submodules with -dirty at the end. – twig Nov 29 '11 at 23:13
  • hmm, seems like i've got it set up correctly but git status still shows dirty submodules. i type that on the project level by the way. do i need to do it on the submodule level also? – twig Dec 01 '11 at 13:07
  • @twig: is there some [`git submodule update`](http://stackoverflow.com/questions/1979167/git-submodule-update) missing, before querying any status? – VonC Dec 01 '11 at 13:20
  • Nope, they're all clean submodules. I just test by creating a new file or editing an existing file in a submodule (without committing) and it marks the submodule as dirty. – twig Dec 03 '11 at 15:06
  • That does not appear to work. .gitmodules wins over .gitconfig settings, so only option at the moment is using the command-line – Allan Jensen May 17 '19 at 08:51
  • @AllanJensen What version of Git are you using? On which OS? – VonC May 17 '19 at 09:31
  • Doesn't matter. They are all like that. I send a patch to the git mailing list but got no feedback. – Allan Jensen May 23 '19 at 09:16
  • @AllanJensen OK, I will monitor https://public-inbox.org/git/4489241.31r3eYUQgx@twilight/ – VonC May 23 '19 at 12:39