I want to merge my feature branch onto the develop branch. However, one of the commits reverted a commit that I now want.
* develop - merge revert PR |\ | * Revert undesired merge |/ * Merge (undesired) |\ | * commit A |/ | ... (lots of commits) | | * feature - commit B | * commit A' |/ *
git rebase -i develop
does not show commit A'. I've tried various options (-p, --keep-empty, -f) without success.
How can I end up with
* feature - commit B * commit A' / * develop - merge revert PR
without individually cherry-picking? (There are more than just two commits - this example is simplified.)
(Note: The most recent commits are at the top in the diagrams. Also note that A and A' have the same contents; that is, they apply the same changes.)
feature
related todevelop
. As you've drawn it I would think they're independent trees that just happen to be in the same database, but from what you've said I doubt that. In any case it doesn't look likeA'
is anywhere in the history ofdevelop
, so why would there be an option to make it show up in a rebase ofdevelop
? – Mark Adelsberger Dec 27 '17 at 17:01