2
我想添加一個目錄及其中的所有文件到git repo,做完之後 git add "AppDir"
, 然後運行git status
,它仍然顯示「修改內容,未跟蹤內容」,如下圖,是否正常行爲?不能使用git遞歸添加目錄?
運行git commit -a
也沒有幫助。下面
是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")
'git commit -a'不會添加新文件。但'git add dir'應該可以工作。 – svick
@svick:在這種情況下,OP已經做到了。狀態中的'(修改內容,未跟蹤內容)'消息是獨特的,並且僅針對子模塊/ gitlinks顯示。 –
@MarkLongair啊,我不認識的郵件,所以我只是認爲這是不同版本的Git。這解釋了它。 – svick