git - Git 提交和推送错误未暂存提交的更改:
问题描述
我在提交和推送客户端时遇到问题,我收到此错误:
On branch VersionOne
Your branch is up to date with 'origin/VersionOne'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: client (modified content)
no changes added to commit (use "git add" and/or "git commit -a")
在我从客户端推送我的文件之前,但是我创建了后端文件并且无法从客户端提交它,所以我在顶级目录中创建了新分支并添加了它们,客户端没有推送。
解决方案
我通过移动到作为内部存储库或子模型的客户端文件夹来解决这个问题,并通过以下方式删除所有 git 文件:
- 窗口中的cmd
- cd到我的项目
- 运行德尔
/F /S /Q /A .git
- 在根文件夹中再次初始化 git 并打包所有内容
注意:确保为任何情况备份所有内容
推荐阅读
- xamarin.ios - 添加链接器标志将导致构建失败
- python - 抓取时如何限制结果数量
- python - 我如何知道亚马逊是否成功发送了电子邮件
- apache-flink - 如果在 Apache flink 中 5 秒内发现 5 次相同的数据,则生成 CEP 事件
- dji-sdk - DJI Matrice 100 为车载电脑供电
- codeigniter - 在控制器中编写查询而不是模型
- laravel - Laravel App\Http\Middleware\Class 未找到
- jquery - 如何使用 jQuery Datepicker 为 AngularJs UI 混合设置(或删除)时区
- python - 在 Scrapy 中以编程方式重置 TCP 连接
- python - Logits 的形状错误