Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Let me rework your example for clarity.</p> <pre><code> C-D-E &lt; topic, origin/topic / A-B &lt; master, origin/master </code></pre> <p>Then someone does work.</p> <pre><code> C-D-E &lt; topic, origin/topic / A-B-F-G &lt; origin/master ^ master </code></pre> <p>You fetched F &amp; G from origin, and then rebased topic onto master. So now your repository looks like this.</p> <pre><code> C-D-E &lt; origin/topic / A-B-F-G &lt; master, origin/master \ C'-D'-E' &lt; topic </code></pre> <p>And this is the problem. origin/topic at E can not be fast-forwarded to topic at E'. Rebase is really only meant for commits that have not been pushed to origin. Since you pushed C, D, and E to origin/topic already, you would have to rewrite history on the remote repository. Hence the error. So you really have three options:</p> <ol> <li><p>Stop pushing a topical branch. If it's only you who is working on topic, there's no need to push it. Just keep rebasing topic on top of master, and when done, fast-forward merge master to topic &amp; push master. Delete local topic branch. Voila!</p></li> <li><p>Merge topic &amp; master. If you need to collaborate on a topical branch, you should probably suck it up and merge.</p></li> <li><p>Force the remote rebase:</p> <p>git push origin topic -f</p> <p>This will force origin/topic to E'. Except by re-writing history in the remote repository, you'll have fire and brimstone, human sacrifice, dogs and cats living together, mass hysteria... and your fellow developers not liking you very much. Not recommended at all.</p></li> </ol>
 

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