gpt4 book ai didi

git add -A 不起作用

转载 作者:行者123 更新时间:2023-12-02 03:46:12 29 4
gpt4 key购买 nike

即使在执行 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选项无关:修改的内容,未跟踪的内容意味着这些文件夹是 submodules

这些子存储库包含未跟踪或已修改的文件。

您需要:

  • 进入这些目录,
  • 在那里添加并提交(并推送到各自的远程,假设这些更改必须回馈到其上游存储库),
  • 然后返回父存储库,再次添加并提交以记录新的 gitlink ( special entry in the parent index ,记录这些子模块的新 SHA1)

但是,如果这些更改纯粹是本地的并且可以忽略(意味着任何使用您当前更改再次克隆您的存储库的人仍然能够使您的程序工作而无需子模块中的任何更改) ,那么您可以忽略 git status 输出。

关于git add -A 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46677642/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com