5
I have the directory contents in my file .gitignore
, as follows:
app/dir/*
But when I give a git status
, git accuses the following:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: app/dir (modified content, untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")
In my opinion, he should not even know or care if there is modified content within this directory, since it should be ignored. What this status means, and how to resolve it?
dir is a submodule?
git status --ignore-submodules
returns the same message?– Marcos Banik
Hm, I was sure it wasn’t a sobmodule (I don’t remember creating it), but running this command comes "Working directory clean"
– bfavaretto
Can I just delete the . git inside that directory? I just discovered that file there.
– bfavaretto
I would examine the contents of
.git/config
before deleting the directory. The section[submodule "app/dir"]
should contain the url of where you cloned the content ofdir
. Here is the recipe for deleting a https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial#Removal submodule– Marcos Banik
Thanks, @Marcosbanik. Don’t want to post this as an answer?
– bfavaretto