I would like to add one directory and all files in it to git repo, after doing
git add "AppDir",
then run git status, it still display “modified content, untracked content”, like below, is that normal behavior?
running git commit -a also not helping.
below is the detail of git status:
bogon:AppDir springrider$ git status
# 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: AppDir (modified content, untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")
The problem here is that
AppDiris a git repository itself – you’ve staged a so-called “gitlink” to that repository. The output ofgit statusis now telling you that within theAppDirrepository there are untracked files and modified content.If you really intended to do this, it’s probably better to add that repository as a submodule, rather than just a plain gitlink.