Hi Thomas,

If you want to maintain the blame history on your revert you can do the
following. This will discard the bad merge from blame history without
needing a force push.

git checkout dabb1b38eaf020bb0f97ea331a3f6c5e5aefe565 -b new_master # the
last good commit on master that you want to "revert" to
git merge --strategy=ours origin/master
git push origin new_master:master

Doing the above changes the git blame for example from:

$ git blame bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF
--snip--
713ce018b1 (Thomas Watson      2020-03-10 16:03:39 -0500  5)
Bundle-Version: 3.15.300.qualifier

to
$ git blame bundles/org.eclipse.osgi.tests/META-INF/MANIFEST.MF
--snip--
27288b2b5b (Alexander Kurtakov 2020-03-08 14:28:04 +0200  5)
Bundle-Version: 3.15.300.qualifier

and gives history that looks like this:

$ git log  --graph --oneline  | head
*   13c9a3027 Fix accidental merge
|\
| * 713ce018b Revert "Merge branch 'master' into osgiR8"
| * e8778b43b Revert "Update OSGi R8 APIs"
| * cee7c1437 Update OSGi R8 APIs
| *   bf506346f Merge branch 'master' into osgiR8
| |\
| |/
|/|
* | dabb1b38e Bug 560974 - Fix exception type for null map key

HTH,
Jonah


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 10 Mar 2020 at 17:30, Thomas Watson <tjwat...@us.ibm.com> wrote:

> I decided to just live with the painful history of reverting the merge
> commit instead of force pushing to rewind history.  Master is back to where
> it should be and back open for development.  I needed to do this before the
> I-Build kicked off today and didn't want to risk waiting for the foundation
> to do the force push to master for me.
>
> Sorry for the bone-headed move on my part.
>
> Tom
>
>
>
>
> ----- Original message -----
> From: Thomas Watson/Austin/IBM
> To: equinox-dev@eclipse.org, platform-releng-...@eclipse.org
> Cc:
> Subject: Incorrect merge of osgiR8 branch into master for
> rt.equinox.framework
> Date: Tue, Mar 10, 2020 3:35 PM
>
> I incorrectly merged into master a long running branch I have for OSGi R8
> development in the rt.equinox.framework.  I have a bug opened against the
> foundation asking to get a force push to master to correct things:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=560997
>
> As much as I dislike a force push to rewind histroy, in this case I think
> it is warranted because the OSGi R8 branch has loads of merge commits and
> it was then itself merged into master.  There is not a simple revert
> operation here to get master back to where it should be.  As of now
> consider master closed for rt.equinox.framework until this is sorted out.
>
> Tom
>
>
>
>
> _______________________________________________
> platform-releng-dev mailing list
> platform-releng-...@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/platform-releng-dev
>
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to