Reputation: 486
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")
Upvotes: 2
Views: 1110
Reputation: 467921
The problem here is that AppDir
is a git repository itself - you've staged a so-called "gitlink" to that repository. The output of git status
is now telling you that within the AppDir
repository 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.
Upvotes: 3