Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>fetch vs pull</h2> <p><code>fetch</code> will download any changes from the remote* branch, updating your repository data, but leaving your local* branch unchanged.</p> <p><code>pull</code> will perform a <code>fetch</code> and additionally <code>merge</code> the changes into your local branch.</p> <p><strong>What's the difference?</strong> <code>pull</code> updates you local branch with changes from the pulled branch. A <code>fetch</code> does not advance your local branch.</p> <h2>merge vs rebase</h2> <p>Given the following history:</p> <pre> C---D---E local / A---B---F---G remote </pre> <p><code>merge</code> joins two development histories together. It does this by replaying the changes that occurred on your local branch after it diverged on top of the remote branch, and record the result in a new commit. This operation preserves the ancestry of each commit.</p> <p>The effect of a <code>merge</code> will be:</p> <pre> C---D---E local / \ A---B---F---G---H remote </pre> <p><code>rebase</code> will take commits that exist in your local branch and re-apply them on top of the remote branch. This operation re-writes the ancestors of your local commits.</p> <p>The effect of a <code>rebase</code> will be:</p> <pre> C'--D'--E' local / A---B---F---G remote </pre> <p><strong>What's the difference?</strong> A <code>merge</code> does not change the ancestry of commits. A <code>rebase</code> rewrites the ancestry of your local commits.</p> <p><code>*</code> This explanation assumes that the current branch is a local branch, and that the branch specified as the argument to <code>fetch</code>, <code>pull</code>, <code>merge</code>, or <code>rebase</code> is a remote branch. This is the usual case. <code>pull</code>, for example, will download any changes from the <em>specified</em> branch, update your repository and <code>merge</code> the changes into the <em>current</em> branch.</p>
 

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