66

Suddenly appeared:

MacBook-Pro: $ git status
On branch dev
Your branch is up-to-date with 'dropbox/dev'.
You are currently editing a commit while rebasing branch 'Releases' on '72ca998'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working directory clean

No changed in the branch. Everything is up to date.

3
  • 2
    have you tried git rebase --continue?
    – Miknash
    Jul 6, 2015 at 17:49
  • 1
    @NickCatib yes. error: could not apply fbbaa72... Version 0.2.0 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". Could not apply fbbaa72581bc420fa6c08f342886488e44fc484c... Version 0.2.0 Jul 6, 2015 at 17:52
  • please, edit your question to add details, try not to put them in the comments. Dec 1, 2020 at 13:36

4 Answers 4

129

git rebase --abort should abort the rebase operation and return to the previous state. But to be sure, what commands did you enter before?

edit: the output of git reflog can show you where the rebase started, it would look something like

7d0b010 HEAD@{0}: rebase finished: returning to refs/heads/bran
7d0b010 HEAD@{1}: rebase: adding file in branch
a7e6693 HEAD@{2}: rebase: checkout master
a7e6693 HEAD@{3}: commit: adding file in master
4c00dd7 HEAD@{4}: checkout: moving from bran to master
3cb192a HEAD@{5}: commit: adding file in branch
0
18

If you end up in this state but you need to keep changes:

  1. Make a backup branch of the current branch: git branch my-backup
  2. On the current branch abort the rebase: git rebase --abort
  3. Merge changes from the backup branch created in step 1: git merge my-backup
11

try to use git rebase --quit if git rebase --abort failed.

git rebase --quit completely discards the changes.

0
0

I ran into this issue while working in Xcode. I've noticed that Xcode 14, has a habit of stashing changes, which can cause issues when rebasing.

Aborting the rebase, Quitting Xcode, then re-rebasing worked for me.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.