'No .gitmodules file to add the line ignore = dirty

So currently I am getting this error in my terminal when trying to commit/push:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   guarded-headland-03173 (modified content)

Apparently, the answer is simply adding ignore = dirty to the .gitmodules file but the problem is that there is no .gitmodules for me.



Solution 1:[1]

all I had to put into the terminal was:

git status --ignore-submodules=dirty

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pauli-E