git - git add mysubmoduledir “不匹配任何文件”虽然子模块有新的提交
问题描述
我top
在 subsubdirectory 中有一个带有子模块的 repo a/sub
。
当我git status
进入时top
,它显示a/sub
为modified: a/sub (new commits)
。要将这些新提交包含在 的新提交中top
,我会这样做git add a/sub
,但是会打印
$ git add a/sub
fatal: pathspec 'a/sub' did not match any files
我错过了什么?
解决方案
观察你在哪里
我在写这篇文章时找到了自己问题的答案:我执行的是git add a/sub
in 目录top/a/sub
而不是 in top
。
推荐阅读
- uwp - 如何在 UWP 中旋转 Textblock 后获得正确的宽度和高度
- html - 用内容扩展 div 宽度
- java - Levenshtein 算法中的缺失值和 NPE
- .net - 多个网站平台上的 GTM 和 GA 跟踪
- outlook - 为所有日历启用 Cloud Elements Microsoft Graph 日历 webhook 很热门吗?
- javascript - 用reduce es6替换过滤器和映射
- c++ - 从 QTableView 插入和删除值时的内存管理
- mysql - 如果字符串重复,子字符串查询无法正常工作
- centos7 - 奇怪的 snmpd 流量
- c# - 如何在 C# CMD 中以管理员权限和密码运行,然后将所有输出保存到字符串?