<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Is there any way to default the "merge button on pull requests" to
    default to the rebase strategy?<br>
    <br>
    <div class="moz-cite-prefix">On 25-04-13 15:59, Edson Tirelli wrote:<br>
    </div>
    <blockquote
cite="mid:CAD7AJncLh-0+iQX0h4YKoWwUBrVHjxVAMZMzxCTN1xKdkyaoVQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div style="">&nbsp; &nbsp;All,</div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;We noticed lately that an increasing number of
          git merges is happening in the Drools/jBPM codebase. Git
          merges can be easily identified in the "network" graph in
          github repo, or by using any other Git client tool, as
          parallel lines in the branch history. E.g.:</div>
        <div style=""><br>
        </div>
        <div style=""><a moz-do-not-send="true"
            href="https://github.com/droolsjbpm/droolsjbpm-knowledge/network">https://github.com/droolsjbpm/droolsjbpm-knowledge/network</a><br>
        </div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Please note that each and every merge, while
          not a big problem by itself, increases the risk of overriding
          code changes (i.e., losing code) as well as increases future
          maintenance cost. If you want know more about it, feel free to
          ask, or just trust me on this... :)<br>
        </div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Git offers an alternative to merges in the form
          of "rebase". Rebase enables developers to commit code on top
          of the most recent change in the branch, instead of in
          parallel to it. It guarantees no code will be lost when doing
          that, and makes it easier to maintain code in the future. If
          you don't know how to rebase code, please read one of the many
          git books/documentation available on line, like:</div>
        <div style=""><br>
        </div>
        <div style=""><a moz-do-not-send="true"
            href="http://git-scm.com/book">http://git-scm.com/book</a><br>
        </div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Also feel free to ask and I will be happy to
          help.</div>
        <div style=""><br>
        </div>
        <div style="">
          &nbsp; &nbsp;There is just one case where rebase can not be used:</div>
        <div style=""><br>
        </div>
        <div style="">* You should NEVER rebase a commit that was
          published to a public repository before.</div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Also, the github pull request "merge" button
          uses merge instead of rebase. While it is very quick and easy
          for a developer to click on that button, please note that it
          introduces merges, and at the same time commits code that was
          not tested by the person doing the merge. It is acceptable for
          small code fixes, but for anything larger than a few lines of
          code changes, you should pull the changes into your machine
          rebasing them, run the tests to make sure they are still clean
          and only after that push the PR changes to the public repo.</div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Please be aware of that and try to minimize
          merges by using rebase whenever possible.</div>
        <div style=""><br>
        </div>
        <div style="">&nbsp; &nbsp;Thanks,</div>
        <div><br>
        </div>
        -- <br>
        &nbsp; Edson Tirelli<br>
        &nbsp; JBoss Drools Core Development<br>
        &nbsp; JBoss by Red Hat @ <a moz-do-not-send="true"
          href="http://www.jboss.com">www.jboss.com</a>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>