5

I have cloned a branch from a remote repository:

git clone -b feature/feature1 http://.....
git status
    On branch feature/feature1
    Your branch is up to date with 'origin/feature/feature1'
    nothing to commit, working tree is clean

Now I am trying to use git rebase -i to squash the two last commits:

git rebase -i HEAD~3

pick ...
pick ....
squash ...

However, I'm getting this error:

error: unable to unlink old 'file1': No such file or directory
error: unable to unlink old 'file2': No such file or directory 
error: unable to unlink old 'file3': No such file or directory
hint: Could not execute the todo command
hint:
hint:     squash 3b6cabf2541e333d614c3cd5dbbb82a37037cc14 some commit
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint:     git rebase --edit-todo
hint:     git rebase --continue
Could not apply 3b6cabf... some commit

Why do I get this error and how can I fix it?

Aurora Wang
  • 1,822
  • 14
  • 22
ceth
  • 44,198
  • 62
  • 180
  • 289
  • git rebase --continue seemed to just work for me. I got a binary conflict that wasn't really an issue so I just checked the problematic file out. – Chucky Aug 29 '19 at 13:55

1 Answers1

1

Looks like git rebase --continue is what you want.

lenin
  • 46
  • 3