<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 9/3/14 1:05 PM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMYG4Gk06Pi8UA5UhRNZd_ZCc4Om+M3s1iUEc-M4FBLAbSgr9w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Sep 2, 2014 at 10:36 PM, Jed
            Brown <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="">Barry Smith <<a moz-do-not-send="true"
                  href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>>
                writes:<br>
                <br>
                > On Sep 2, 2014, at 8:46 AM, Jed Brown <<a
                  moz-do-not-send="true" href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>>
                wrote:<br>
                ><br>
                >> Matt, when you merged 'tisaac/thplex', you got
                thousands of merge<br>
                >> commits to 'next' that should never be in
                'master'.  I have reset<br>
                >> 'master' to get it out of there (everything
                else that was in 'master' is<br>
                >> there now).  This means that any recent topic
                branches will need to be<br>
                >> rebased and any updated 'master' will need to
                be reset to<br>
                >> 'origin/master'.  Fix 'master' first:<br>
                >><br>
                >>  git fetch<br>
                >>  git checkout master<br>
                >>  git reset --hard origin/master<br>
                ><br>
                >    Jed, please is there a way to automate this.
                Relying on people<br>
                >    getting to the second paragraph of an email and
                actually following<br>
                >    the directions properly seems a pretty weak
                “software process”.<br>
                <br>
              </div>
              This is never supposed to be necessary.  I think this is
              the first time<br>
              and if Matt looks at his merges, we shouldn't ever need to
              do it<br>
              again. ;-)</blockquote>
            <div><br>
            </div>
            <div>But this was my whole point in our process discussion.
              Tools should subtract</div>
            <div>from what we have to worry about, not add to the
              cognitive load. We should</div>
            <div>all be manually checking for less, not more. A good
              tool would prevent any</div>
            <div>merges to master from a branch that was created from
              next. This seems like</div>
            <div>the simplest requirement to me.</div>
          </div>
        </div>
      </div>
    </blockquote>
    Should this be possible with git hooks? I've never had occasion to
    use them but naively, I'd want to do something like create a commit
    in 'next' which is tagged 'NeverMergeToMaster' and then set up a
    hook which will automatically reject any merge to master including a
    commit with that tag. The practicalities aren't clear to me, though,
    since as far as I can tell BitBucket doesn't give you direct access
    to hooks, which you would probably need to employ a strategy like
    this one:
    <a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/13381105/git-hook-to-prevent-an-experimental-branch-pushed-to-a-release-or-master-branch">http://stackoverflow.com/questions/13381105/git-hook-to-prevent-an-experimental-branch-pushed-to-a-release-or-master-branch</a>
    <br>
    <br>
    <blockquote
cite="mid:CAMYG4Gk06Pi8UA5UhRNZd_ZCc4Om+M3s1iUEc-M4FBLAbSgr9w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>   Matt</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="">
                >> To rebase a topic branch that was started in
                the last few days (after<br>
                >> 'tisaac/thplex' was merged; if you started
                before that merge, you don't<br>
                >> need to do anything),<br>
                ><br>
                >    How do I know if I started it before or after
                the tragic event?<br>
                <br>
              </div>
                git log --grep tisaac/thplex<br>
              <br>
              If your history contains the merge, you should rebase.<br>
              <div class=""><br>
                >> check it out, look through recent history to
                find<br>
                ><br>
                >    How do I check through the recent history?<br>
                <br>
              </div>
              git log<br>
              <div class=""><br>
                >> the commit on 'master' that you started from
                (NOT part of your work).<br>
                >> Suppose that commit is abcd1234.<br>
                ><br>
                >    How do I know what that commit is?<br>
                <br>
              </div>
              When you look at "git log", it will be the first commit
              that is not one<br>
              you wrote for your topic branch.<br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          What most experimenters take for granted before they begin
          their experiments is infinitely more interesting than any
          results to which their experiments lead.<br>
          -- Norbert Wiener
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>