git - git:使用来自主错误的最新更改更新当前开发分支
问题描述
我在这里做了一些关于如何使用 master 的最新更改最好地更新当前分支的搜索。
所以我这样做了:
git checkout add_game_monsters && git rebase master
这样做之后,我认为我的分支处于不确定状态,因为我收到了这个错误:
Patch failed at 0001 added game characters 失败的补丁副本位于:.git/rebase-apply/patch
所以我查看了那个补丁文件,它有 8000 行长。
我也不能再更改 Visual Studio 中的分支,因为它们都是灰色的。
我尝试重新启动,但遇到了同样的问题。
我怎样才能解决这个问题?
谢谢!
一个 git 状态显示:
rebase in progress; onto 3cb516c3
You are currently rebasing branch 'add_game_monsters' on '3cb516c3'.
(fix conflicts and then run "git rebase --continue")
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by them: ../Database/Tables/dbo.gamers.sql
deleted by them: ../Database/Tables/dbo.monsters.sql
解决方案
解决这种冲突可能需要的不仅仅是表面上的。就像在基础分支上所做的更改(我知道它们是在基础分支上进行的,因为它们在 上被删除,这add_game_monsters
是在变基期间进行的)需要移动到另一个文件?但是如果它们可以像那样被丢弃,你可以这样做:
git rm ../Database/Tables/dbo.gamers.sql
git rm ../Database/Tables/dbo.monsters.sql
git rebase --continue
推荐阅读
- c++ - Gstreamer 解码插件在 opencv 中无法充分发挥作用
- javascript - 将类应用于 div,其中包含另一个 div,其中包含特定类
- django - Angular HttpClient 通过设置标头承载无限加载
- java - 批量拖放文件夹以在java应用程序中读取
- mysql - 为什么这个查询没有找到所有带有 A 的歌曲?
- git - git cli yes/no wrapper 将“something”重命名为“something”失败。我应该再试一次吗?
- c# - 更改多个时区时间
- c# - .NET Core 中的专用路由无法识别产生 404
- java - 如何保持 znode 及其备份的数据与 zookeeper 的一致性
- java - ActiveMQ javax.net.ssl.sslhandshakeexception null 证书链