[petsc-dev] 'master' RESET after bad merge! - 'tisaac/thplex' was based on 'next'

Barry Smith bsmith at mcs.anl.gov
Tue Sep 2 21:29:46 CDT 2014


On Sep 2, 2014, at 8:46 AM, Jed Brown <jed at jedbrown.org> wrote:

> Matt, when you merged 'tisaac/thplex', you got thousands of merge
> commits to 'next' that should never be in 'master'.  I have reset
> 'master' to get it out of there (everything else that was in 'master' is
> there now).  This means that any recent topic branches will need to be
> rebased and any updated 'master' will need to be reset to
> 'origin/master'.  Fix 'master' first:
> 
>  git fetch
>  git checkout master
>  git reset --hard origin/master

   Jed, please is there a way to automate this. Relying on people getting to the second paragraph of an email and actually following the directions properly seems a pretty weak “software process”. 
> 
> To rebase a topic branch that was started in the last few days (after
> 'tisaac/thplex' was merged; if you started before that merge, you don't
> need to do anything),

   How do I know if I started it before or after the tragic event?

> check it out, look through recent history to find

   How do I check through the recent history?

> the commit on 'master' that you started from (NOT part of your work).
> Suppose that commit is abcd1234.  

   How do I know what that commit is?

> Then run
> 
>  git checkout your/topic-branch
>  git rebase --onto origin/master abcd1234
> 
> Your topic branch will be applied to the new 'master'.  If you already
> pushed your branch, you'll need to force push it now
> 
>  git push origin +your/topic-branch
> 
> 
> 
> Matt and Toby: 'tisaac/thplex' needs to be rebased onto 'master' before
> we can accept it.  Matt, please remember to look at what you are
> merging.  When the commit message says you are merging hundreds of
> commits, but you didn't review hundreds of commits, it should be a sign
> that something is amiss.




More information about the petsc-dev mailing list