git add-A不工作

git add-A不工作,git,github,git-add,Git,Github,Git Add,即使在执行git add-A之后,当我运行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) #

即使在执行git add-A之后,当我运行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:   src/cartographer (modified content, untracked content)
#   modified:   src/cartographer_ros (untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")
知道如何解决这个问题吗?

这和-A选项无关:已修改的内容,未跟踪的内容意味着这些文件夹是无效的

这些子回购协议包括未跟踪或修改的文件

您需要:

进入那些目录, 在那里添加并提交,并推送到各自的远程,假设这些更改必须返回到其上游回购协议, 然后返回父repo,再次添加并提交,以便记录新的,记录这些子模块的新SHA1
但是,如果这些更改纯粹是本地的,并且可以忽略,这意味着任何人再次克隆您的repo,而您当前的更改仍然能够使您的程序在没有子模块中的任何更改的情况下工作,那么您可以忽略git状态输出。

git add-a而不是a?您引用的文本是git commit从git status保存的内容,与git status直接写入的内容不太一样,这让我想知道:a您使用的是什么版本的git,b您是否位于顶级目录的子目录中?运行git-version和git rev parse-show cdup,看看我的怀疑是否正确:git版本号低于2.0,并且位于src/*为../src/*的子目录中。@Andromelus git add-a是有效的命令。。。