首页 > 解决方案 > 解决生产中子模块中的手动覆盖文件

问题描述

在某些时候,我不得不手动修复子模块中的问题并手动覆盖两个文件。

但是现在下次我想将最新的提交推送到生产时,我得到了这个错误。如何解决?如何github.com:xxx/submodule在生产中拉取子模块中的最新提交?

root@test:/var/www/test.dk# git push production
Enumerating objects: 33, done.
Counting objects: 100% (33/33), done.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (18/18), 3.79 KiB | 971.00 KiB/s, done.
Total 18 (delta 11), reused 0 (delta 0), pack-reused 0
remote: Already on 'master'
remote: From github.com:xxx/submodule
remote:    40608f1..08243d5  master     -> origin/master
remote: error: Your local changes to the following files would be overwritten by checkout:
remote:         request/Input.php
remote:         stream/Headers.php
remote: Please commit your changes or stash them before you switch branches.
remote: Aborting

标签: git

解决方案


推荐阅读