I have the following branches:
─┬──────────────────────────────────────┬── master
│ │
│ │
│ └── staging
│
│
└─X───Y─┬───────────────────────────────── develop
│ ▲
│ │
└────A────────B──────C────┴──┬──── feature/abc
│
│
└──── merge/feature/abc
Quick explanation of each one:
- master: this is the production branch - anything merged here goes to production.
- staging: this branch is used to temporarily group a bunch of different features that will go to production together as a release. Before a release, a fresh staging is cut from master.
- develop: mainline branch - regular branch that features are continually integrated into, as they are completed.
- feature/abc: a typical feature branch, cut from develop.
- merge/feature/abc: a working branch that I am trying to rebase, so that I can prepare the feature to be rebased off staging, as I prepare to do a release. (I just don't want to mess up the feature/abc.)
I want to make the merge/feature/abc rebased off staging, so that it contains only the relevant commits in feature/abc. i.e. I want merge/feature/abc to contain only commits A, B, and C, but not X and Y. This would happen after the feature/abc branch has been merged and tested on develop.
According to the git manual, the commands I want is:
git rebase --onto staging develop merge/feature/abc
When I do that, the output says:
First, rewinding head to replay your work on top of it...
... and that's it - no other output. It just stops. As I understand it, there's supposed to be more output as git rebase applies commits. The merge/feature/abc branch does get rebased, but it does *not contain any commits from feature/abc, if I do git log. If I run git status, it says:
On branch merge/feature/abc
nothing to commit, working tree clean
If I run git diff staging, there is no diff. So it's basically reset to staging.
What am I doing wrong?