J
J
Jekson2020-10-06 13:37:09
git
Jekson, 2020-10-06 13:37:09

How to end a rebase?

I want to pull the develop branch into feature. From feature I do I
git rebase develop
get a conflict message

First, rewinding head to replay your work on top of it...
Applying: feature-8905
Using index info to reconstruct a base tree...
M       src/.source/packages
Falling back to patching base and 3-way merge...
Auto-merging src/.source/packages
CONFLICT (content): Merge conflict in src/.source/packages
error: Failed to merge in the changes.
Patch failed at 0001 feature-8905
Use 'git am --show-current-patch' to see the failed patch

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

I edit the conflict file by hand, run
git rebase --continue
I get
src/.source/packages: needs merge
You must edit all merge conflicts and then
mark them as resolved using git add

Then I run
git add .source/packages

Everything seems to be ok, git status
rebase in progress; onto e3a6baf
You are currently rebasing branch 'feature-11' on 'e3a6baf'.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working tree clean


Execute git rebase --continue
and finally
Applying: feature-8905
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".


if you look at the status now, then the rebase is not completed
rebase in progress; onto e3a6baf
You are currently rebasing branch 'feature-11' on 'e3a6baf'.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working tree clean

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-10-06
@jcmvbkbc

It seems that during the rebase process, the next patch became empty. If that's the case and you don't need an empty commit in its place, you need to do a git rebase --skip. If this is not the case, you need to understand what exactly happened.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question