我的/ rails目录中有三个项目:test_app /,dma4 /和test2_app /。我目前正在test_app /目录(已经为git初始化)并提交了更改。提交后,我做了'git status'来查看更改。由于某种原因,它告诉我没有变化,除了../dma4和../test2_app这是其他项目!显示其他项目变化的Git
为什么它会告诉我有关当前项目之外的更改?我不应该忽视其他项目在我的.gitignore文件...
这里的确切消息:
test_app $ git status
# On branch master
# Changed but not updated:
# (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: ../dma4 (modified content)
# modified: ../test2_app (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
test_app $
这些其他项目不子文件夹的当前项目,这里的层次结构的外观:
轨/ test2_app 轨/ DMA4 轨/ test_app
它为什么要这么做?
'git rev-parse --show-toplevel'的输出是什么? –
我希望我尝试了你的命令,但在刷新stackoverflow之前,我做了ls -la ../,并在所有应用程序的父目录中看到了.git!一些我错误地运行'git init'。在父目录里面! – dingalingchickenwiing