Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>"Conflicts" mean "parallel evolutions of a same content". So if it goes "all to hell" during a merge, it means you have massive evolutions on the same set of files.</p> <p>The reason why a rebase is then better than a merge is that:</p> <ul> <li>you rewrite your local commit history with the one of the master (and then reapply your work, resolving any conflict then)</li> <li>the final merge will certainly be a "fast forward" one, because it will have all the commit history of the master, plus only your changes to reapply.</li> </ul> <p>I confirm that the correct workflow in that case (evolutions on common set of files) is <strong>rebase first, then merge</strong>.</p> <p>However, that means that, if you push your local branch (for backup reason), that branch should not be pulled (or at least used) by anyone else (since the commit history will be rewritten by the successive rebase).</p> <hr> <p>On that topic (rebase then merge workflow), <a href="https://stackoverflow.com/users/207119/barraponto">barraponto</a> mentions in the comments two interesting posts, both from <a href="http://www.randyfay.com/" rel="noreferrer">randyfay.com</a>:</p> <ul> <li><a href="http://www.randyfay.com/node/91" rel="noreferrer"><strong>A Rebase Workflow for Git</strong></a>: reminds us to fetch first, rebase:</li> </ul> <blockquote> <p>Using this technique, your work always goes on top of the public branch like a patch that is up-to-date with current <code>HEAD</code>. </p> </blockquote> <p>(a similar technique <a href="http://fourkitchens.com/blog/2009/04/20/alternatives-rebasing-bazaar" rel="noreferrer">exists for bazaar</a>)</p> <ul> <li><a href="http://www.randyfay.com/node/89" rel="noreferrer"><strong>Avoiding Git Disasters: A Gory Story</strong></a>: about the dangers of <code>git push --force</code> (instead of a <code>git pull --rebase</code> for instance)</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload