gitversion-controlgit-addgit-statusgit-stage

unable to add files with git add


I have tried to git add a file. But when I check git status, the file is still marked as "Changes not staged for commit". I have read many similar questions and I have tried everything:

Still nothing seems to work

That is what it looks like:

enter image description here

Any ideas, what else to try or what I may have missed?

Thanks for any help in advance!

EDIT:

This whole _build/ folder is created, when I run jb-build systemtechnik-fuer-energieeffizienz. It contains (mainly, besides some other stuff, like these .doctree documents) the html output of a jupyter book created by all these jupyter notebooks in the nb/ folder (see here jupyter book). So it is not a submodule (in my understanding submodules have an own .git folder, however, inside _build/ there is no such folder)


Solution

  • This whole _build/ folder is created, when I run jb-build systemtechnik-fuer-energieeffizienz

    Then it should be ignored:

    cd C:/Users/andre/Documents/GitLab/OER4EE_SYE/systemtechnik-fuer-energieeffizienz
    echo build/>>.gitignore
    git rm --cached -r build/
    git check-ignore -v -- build/.doctrees/SYE/doctree
    

    Assuming doctree is a file, the last git check-ignore command should return a .gitignore rule, and git status should not display it, ever.

    So it is not a submodule (in my understanding submodules have an own .git folder, however, inside _build/ there is no such folder)

    A submodule would not have a .git/ subfolder, but: