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

How do I achieve this? I've tried:
- git rebase Awhen on- C
- 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'

 
    