What is a dirty submodule?

I see ignore = dirtyin the file .gitmodule.

Example:

[submodule "docs/submodules/netvirt"]
    path = docs/submodules/netvirt
    url = ../netvirt
    branch = .
    ignore = dirty

The documentation states:

"dirty" ignores all changes in the submodule tree and accepts only the differences between the HEAD of the submodule and the fixation recorded in the superproject.

I can’t understand what this means. Can anyone put this in plain language?

I understand that when I added the submodule to the super project, it was in state C (HEAD in C), and then later, once it was now in state F (HEAD in F). ignore=dirtywill only consider changes to D, E, F (which should do!)

It is clear that I did not understand something. What is it?

+4
source share
1 answer

"" , Git: , , (, ), , , / .

ignore = dirty , (.. , , / ), . , , - , . C, F.

, ignore = dirty:

  • Submodule ​​ , , ( ). , .
  • Submodule ​​ , , ( ). , ( ignore = dirty).
  • , , . , ( ).
  • , , . , ( , ignore = dirty).
+3

Source: https://habr.com/ru/post/1666532/


All Articles