{"thread":{"id":"62476","subject":"\"git add -A\" should respect \"ignore = all\" in \".gitmodules\"","startedAt":"2024-11-11T09:13:21Z","lastAt":"2026-02-06T12:53:59Z","messageCount":2,"participants":["Oliver Kopp","Claus Schneider"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"506978","messageId":"CAA55TJo_AxC8NPbaXAi7fW+XfbxnXvVKT71x3TkyCt71+vQ-Vw@mail.gmail.com","threadId":"62476","inReplyTo":null,"subject":"\"git add -A\" should respect \"ignore = all\" in \".gitmodules\"","fromName":"Oliver Kopp","fromEmail":"kopp.dev@gmail.com","sentAt":"2024-11-11T09:13:09Z","receivedAt":"2024-11-11T09:13:21Z","isPatch":false,"sender":{"key":"kopp.dev@gmail.com","avatar":null},"body":"I have a repository with \"ignore = all\" set in \".gitmodules\"\n\n[submodule \"abbrv.jabref.org\"]\n  path = buildres/abbrv.jabref.org\n  url = https://github.com/JabRef/abbrv.jabref.org.git\n  ignore = all\n  shallow = true\n\n\"git status\" reports no changes\n\nNow, I do\n\n1. \"echo test >> CHANGELOG.md\"\n2. \"git status\"\n3. See that only \"CHANGELOG.md\" has modifications\n4. \"git add -A\"\n5. See that \"CHANGELOG.md\" and \"buildres/abbrv.jabref.org\" has modifications.\n\nThis is consistent to the documentation:\n\nA. \"ignore = all\" is instructing \"git status\" (and git diff family)\nonly (https://git-scm.com/docs/gitmodules/2.10.5#Documentation/gitmodules.txt-submoduleltnamegtignore)\nB. \"git add -A\" adds \"all files in the entire working tree\"\n(https://git-scm.com/docs/git-add#Documentation/git-add.txt--A)\n\nHowever, I think this is not consistent in itself: The files output by\n\"git status\" should match the files being handled by \"git add -A\".\n\nI am aware of the workaround to use \"git update-index\n--assume-unchanged path/to/submodule\" for each ignore sub module.\n\nOne can try out at git@github.com:JabRef/jabref.git.\n\nStackOverflow question on this: https://stackoverflow.com/q/66773544/873282\n\nMy wish: \"git add -A\" should respect \"ignore = all\" in \".gitmodules\"\n\nWDYT?\n\nCheers,\n\nOliver\n"},{"id":"535332","messageId":"CA+GP4bqVephG4creBWsqt3ez3UT_zLFb3EP3vbGouC41O4yv0A@mail.gmail.com","threadId":"62476","inReplyTo":"CAA55TJo_AxC8NPbaXAi7fW+XfbxnXvVKT71x3TkyCt71+vQ-Vw@mail.gmail.com","subject":"Re: \"git add -A\" should respect \"ignore = all\" in \".gitmodules\"","fromName":"Claus Schneider","fromEmail":"claus.schneider@eficode.com","sentAt":"2026-02-06T12:53:46Z","receivedAt":"2026-02-06T12:53:59Z","isPatch":false,"sender":{"key":"claus.schneider@eficode.com","avatar":"https://avatars.githubusercontent.com/u/3347017?v=4"},"body":"Hi ..\nPlease have a look here: https://github.com/gitgitgadget/git/pull/1987 .\n\nWould this solve the problem?\n\nBest regards\nClaus Schneider\n\nOn Mon, Nov 11, 2024 at 10:13 AM Oliver Kopp <kopp.dev@gmail.com> wrote:\n>\n> I have a repository with \"ignore = all\" set in \".gitmodules\"\n>\n> [submodule \"abbrv.jabref.org\"]\n>   path = buildres/abbrv.jabref.org\n>   url = https://github.com/JabRef/abbrv.jabref.org.git\n>   ignore = all\n>   shallow = true\n>\n> \"git status\" reports no changes\n>\n> Now, I do\n>\n> 1. \"echo test >> CHANGELOG.md\"\n> 2. \"git status\"\n> 3. See that only \"CHANGELOG.md\" has modifications\n> 4. \"git add -A\"\n> 5. See that \"CHANGELOG.md\" and \"buildres/abbrv.jabref.org\" has modifications.\n>\n> This is consistent to the documentation:\n>\n> A. \"ignore = all\" is instructing \"git status\" (and git diff family)\n> only (https://git-scm.com/docs/gitmodules/2.10.5#Documentation/gitmodules.txt-submoduleltnamegtignore)\n> B. \"git add -A\" adds \"all files in the entire working tree\"\n> (https://git-scm.com/docs/git-add#Documentation/git-add.txt--A)\n>\n> However, I think this is not consistent in itself: The files output by\n> \"git status\" should match the files being handled by \"git add -A\".\n>\n> I am aware of the workaround to use \"git update-index\n> --assume-unchanged path/to/submodule\" for each ignore sub module.\n>\n> One can try out at git@github.com:JabRef/jabref.git.\n>\n> StackOverflow question on this: https://stackoverflow.com/q/66773544/873282\n>\n> My wish: \"git add -A\" should respect \"ignore = all\" in \".gitmodules\"\n>\n> WDYT?\n>\n> Cheers,\n>\n> Oliver\n>\n"}]}