1

I have two branchs in my project, feature and develop. I commit and push my edited code to my feature branch two times(commit1 and commit2, the second one is the latest version). The problem is when I want to rebase my develop branch with my feature branch, it use commit1 version to rebase. How to fix this problem?

  • 1
    It depends on the command you use to perform your rebasing operation, or the place you're currently at when you do. Please show us these commands. – Obsidian Apr 21 '19 at 10:36
  • `git checkout feature` and `git rebase develop feature`. However, I accidentally perform `git push -f` without resolving any conflicts. Then I notice that something went wrong, I try to rebase again and the problem occurs. – Songpol Rungsawang Apr 21 '19 at 11:13

1 Answers1

0

As in "Undoing a git rebase", check the output of git reflog and:

  • reset feature to what it was before the rebase
  • same for the develop branch

Then try again your rebase, paying attention to conflict resolution and rebase status.
Finally push --force one more time.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250