Skip to content

Instantly share code, notes, and snippets.

@awendt
Created March 8, 2010 12:03
Show Gist options
  • Save awendt/325096 to your computer and use it in GitHub Desktop.
Save awendt/325096 to your computer and use it in GitHub Desktop.
Consider this:
I have developed a feature on a branch (F) that is merged into a staging branch (S) using `--no-ff`.
Meanwhile, the master branch (M) has evolved:
I--------M
\
\---S
\ /
F
I'd like to rebase S onto M to make sure my changes are still working.
I'd like to keep the merge commit on S to see where features have been merged:
I---M---S
\ /
F
What I always get is:
I---M---F
What I've tried:
on branch S: git rebase M
on branch S: git rebase -p M
on branch S: git rebase --onto M M^
on branch S: git rebase -p --onto M M^
on branch M: git cherry-pick -m 1 S
A repo for proof of concept can be found at http://github.com/awendt/git-task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment