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"?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

8 Comments

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.
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: is there some git submodule update missing, before querying any status?
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.
That does not appear to work. .gitmodules wins over .gitconfig settings, so only option at the moment is using the command-line
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.