Since gitmodules were introduced in Git, I like to add them like so:
[submodule \"actionbarsherlock\"]
path = actionbarsherlock
url = git://github.com/JakeWh
I'm not sure about a default option. Were it a binary state (ignore or not), you could get traction with:
diff.ignoreSubmodules
Sets the default value of --ignore-submodules. Note that this affects only git diff Porcelain, and not lower level diff commands such as git diff-files. git checkout also
honors this setting when reporting uncommitted changes.
But as you're using dirty I'm not sure there's a way to set a default. Regardless, you could do this with a git alias in your $PATH. Write a script that accepts the submodule as an argument and set the proper dirty configuration value, then add that script to your $PATH. Call it git- and it'll be available as git .