0

I have a feature branch say branch A and from A I have created branch B, later created branch C from B. Branch B got some more commits and got merged into branch A. I want to rebase branch C on branch A.

Pictorial representation:

Actual scenario actual scenario

Expecting:
expected scenario

How do I achieve this? I've tried:

  1. git rebase A when on C
  2. git rebase --onto A B C

In both cases when I try to do git push I'm getting error:

! [rejected]            C -> C (non-fast-forward)<br/>
error: failed to push some refs to 'https://github.com/repo/myRepo.git'
phd
  • 82,685
  • 13
  • 120
  • 165
Diksha
  • 406
  • 5
  • 20

0 Answers0