I see ignore = dirty
in a .gitmodule
file.
Example:
[submodule "docs/submodules/netvirt"]
path = docs/submodules/netvirt
url = ../netvirt
branch = .
ignore = dirty
The documentation states:
"dirty" will ignore all changes to the submodules work tree and takes only differences between the HEAD of the submodule and the commit recorded in the superproject into account.
I cant understand what this means. Can someone state this in a simple language?
What I understand is that say when I added the submodule to the super project, it was at state C (HEAD at C) and then later after sometime its now at state F (HEAD at F). ignore=dirty
will only consider changes D, E, F ( which is what it should do! )
Clearly, I have misunderstood something. What is it?
HEAD
and/or the work-tree differs from the index. Each submodule is its own repository, so to test if a submodule is dirty, "cd" into the submodule and test whether the repository is dirty. – Rawdin