Today I did some work on a branch in git only to discover that I based it on some unstable code rather than the stable code that I usually want to use as a baseline.
You can fix this by using a bit of git’s rebase magic:
git rebase --onto master testing
This moves the entire current branch onto another.


22 May 2012 at 10:44
Reblogged this on More Mind Spew-age from Harold Spencer Jr. and commented:
Some good Git work. Good explanation on how to get out of a tricky situation. Thanks!
23 May 2012 at 01:58
This is a useful technique when using git to manage a patch set that’s rebased on a changing upstream, as described in II.2 in the following URL
http://pkgs.fedoraproject.org/gitweb/?p=openstack-nova.git;a=blob_plain;f=update-patches.txt;hb=HEAD
http://pkgs.fedoraproject.org/gitweb/?p=openstack-nova.git;a=blob;f=update-patches.sh;hb=HEAD