GIT应该怎么做——所有冲突都已解决:运行“git rebase --continue”。

4

当我运行git status时,我看到以下信息,似乎建议我运行git rebase --continue

昨天我遇到了合并冲突,解决了它,合并了它并将其推送到我们的暂存站点。

更新 我运行了git rebase --skip,但导致更多问题!

$ (716-RWD) git status
On branch 716-RWD
Your branch is up-to-date with 'origin/716-RWD'.
You are currently rebasing branch '716-RWD' on '7e68797'.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working directory clean
holy in ~/ubuntu_1404/httpdocs/magento
$ (716-RWD) git rebase --skip
Applying: themed product listings fro mobile
Using index info to reconstruct a base tree...
A   skin/frontend/bootstrapped/default/css/rwd.css
M   skin/frontend/bootstrapped/default/js/boutique.js
A   skin/frontend/bootstrapped/default/sass/_catalog-categories.scss
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): skin/frontend/bootstrapped/default/sass/_catalog-categories.scss deleted in a2de9914584b4eae3b335700e9ef6486c858ab43 and modified in themed product listings fro mobile. Version themed product listings fro mobile of skin/frontend/bootstrapped/default/sass/_catalog-categories.scss left in tree.
CONFLICT (modify/delete): skin/frontend/bootstrapped/default/css/rwd.css deleted in a2de9914584b4eae3b335700e9ef6486c858ab43 and modified in themed product listings fro mobile. Version themed product listings fro mobile of skin/frontend/bootstrapped/default/css/rwd.css left in tree.
Failed to merge in the changes.
Patch failed at 0006 themed product listings fro mobile
The copy of the patch that failed is found in:
   /Users/holy/ubuntu_1404/httpdocs/magento/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

holy in ~/ubuntu_1404/httpdocs/magento
$ (716-RWD) git status
On branch 716-RWD
Your branch is up-to-date with 'origin/716-RWD'.
You are currently rebasing branch '716-RWD' on '7e68797'.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   app/design/frontend/bootstrapped/default/template/catalog/navigation/left.custom.phtml
    new file:   media/catalog/category/Booster.png

Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add/rm <file>..." as appropriate to mark resolution)

    deleted by us:   skin/frontend/bootstrapped/default/css/rwd.css
    deleted by us:   skin/frontend/bootstrapped/default/sass/_catalog-categories.scss

你也可以执行 git rebase --abort。 - Martin G
@Martin,我执行了git rebase --skip命令,但似乎产生了更多的变化,现在不确定该怎么办?我已经在我的问题中更新了更多细节。 - Holly
1
@Holy 首先你需要了解什么是 rebasing,并练习一下使用测试代码库。你现在正在进行未完成的 rebase 操作中。如果你放弃操作,可能会撤销你的任何提交,但幸运的是,git reflog 会保存所有的提交,因此你不会失去任何东西。 - sashoalm
可能是Git Rebase期间的Git提交 - 到底发生了什么?的重复问题。 - sashoalm
2个回答

8
最后我运行了git rebase --abort,然后运行git pull。一切恢复正常,并且我在该分支上所做的所有更改似乎都在那里。
$ (716-RWD) git rebase --abort
ross in ~/ubuntu_1404/httpdocs/magento
$ (716-RWD) git status
On branch 716-RWD
Your branch is behind 'origin/716-RWD' by 7 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
nothing to commit, working directory clean
ross in ~/ubuntu_1404/httpdocs/magento
$ (716-RWD) git pull

0

我也遇到了同样的问题,尝试一下:

git rebase --quit


相对于“解决问题并运行‘git rebase --continue’”有何优势? - greybeard

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接