Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So-called "Fast-forward" merges don't produce a commit, whereas other merges (often refered to as "octopus merge" (now you see why github's mascott is an octocat)) produce commits.</p> <p>Basically, a Fast-forward happens when your branches did not diverge.</p> <p>Say you want to merge a branch <code>foo</code> in the <code>master</code> branch. If these branches did not diverge, you would have an history like this (each <code>*</code> represents a commit):</p> <pre><code>*---* (master) \ *---*---* (foo) </code></pre> <p>In this situation, the merge is <strong>fast-forward</strong> because (according to the graph theory, which is the underlying foundation of a git graph), <code>master</code> is reachable from <code>foo</code>. In other words, you just have to move the <code>master</code> reference to <code>foo</code>, and you're done:</p> <pre><code>*---* \ *---*---* (master, foo) </code></pre> <p>When your branches diverge:</p> <pre><code>*---*---* (master) \ *---*---* (foo) </code></pre> <p>You have to create a commit to "join" the two branches:</p> <pre><code> ↓ *---*---*-------* (master) \ / *---*---* (foo) </code></pre> <p>The commit pointed by the arrow is the merge commit and has two parent commits (the former <code>master</code> branch tip, and the current <code>foo</code> branch tip).</p> <p>Note that you can force Git to create a merge commit for a fast-forward merge with the <code>--no-ff</code> option.</p> <p>I highly recommend reading <a href="http://think-like-a-git.net/">http://think-like-a-git.net/</a> for a good understanding of how the graph theory applies to git (you don't need to know the graph theory, everything you need to know is on the website), which will make working with Git incredibly easier :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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