我正面临一个我不知道如何解决的问题。
我从我的分支对master做了一个rebase:
git rebase master
并得到以下错误
First, rewinding head to replay your work on top of it...
Applying: checkstyled.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging AssetsLoader.java
CONFLICT (content): Merge conflict in AssetsLoader.java
Failed to merge in the changes.
Patch failed at 0001 checkstyled.
所以我去我最喜欢的编辑器,修复了1行冲突,保存文件,并做了一个git状态,得到以下输出:
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: PassengerContactHandler.java
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: AssetsLoader.java
#
我做了一个git添加AssetsLoader.java和一个git状态,并得到如下:
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: AssetsLoader.java
# modified: PassengerContactHandler.java
#
当我git rebase -continue时,我得到:
git rebase --continue
You must edit all merge conflicts and then
mark them as resolved using git add
我知道我可以跳过补丁并继续重新建立基础,但我不确定passenger - contacthandler .java中的更改是否会重新建立到我的分支中。
所以我不确定,我该怎么做?
编辑:是否冲突解决后的文件与原始版本完全相同?
非常感谢, 卢卡斯< / p >编辑,我又遇到了这样的事:
又发生在我身上了,
(307ac0d...)|REBASE)$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: assets/world/level1/Level-1.xml
# modified: George.java
# modified: DefaultPassenger.java
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# mb-art/originalAssets/27dec/
((307ac0d…)|REBASE)$ git REBASE—继续
You must edit all merge conflicts and then
mark them as resolved using git add
git -版本
git version 1.7.1