petyar
petyar

Reputation: 535

Git rebase doesn't move past file deleted by us

I am trying to rebase my master based on upstream.

  1. When I rebase, I get a CONFLICT (modify/delete): file.txt deleted in HEAD and modified in <version>.
  2. git status says deleted by us: file.txt
  3. I git rm file.txt. I get needs merge
  4. but now git status says all conflicts fixed
  5. when I git rebase --skip I get back to (1.)

git version 2.10.1

Thanks!

Upvotes: 2

Views: 210

Answers (1)

Nikhita Raghunath
Nikhita Raghunath

Reputation: 4454

Doing a git rebase --skip will nullify any changes you made during the rebase. You are almost correct with your workflow, you only need to do the following after doing a git rm file.txt:

  • git add . - to make sure all your changes have been added to staging
  • git status - for a sanity check
  • git rebase --continue - this will save all the changes that you did during the rebase.

Upvotes: 2

Related Questions