Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is why it's important to manage your branches well, in particular to use topic branches and to merge upwards.</p> <p>You should make that fix on a topic branch, forked from a common ancestor of all branches which will need the fix, and then merge it into both master and paypal:</p> <pre><code>x - x - x - x ------------- X (master) |\ | | x - x - x ---- X (paypal) | \ / / x (bugfix) --------------- </code></pre> <p>If you have already made your bugfix, and you mistakenly made it on master instead of from the appropriate merge base, and the history on master hasn't been published, you should cherry-pick or rebase it to the right place:</p> <pre><code># If the bugfix commit is not at the tip of master, you can rebase to get it there: git rebase -i &lt;commit before the bugfix&gt; master # rearrange the list of commits to put the bugfix at the tip, save and quit # Now either cherry-pick or rebase the commit to the right place # (rebase is easier if the bugfix is actually several commits) # Cherry-pick # make a branch and cherry-pick git checkout -b bugfix &lt;SHA1 of merge base&gt; git cherry-pick &lt;SHA1 of bugfix&gt; # remove the commit from master, assuming it's still on the tip git checkout master git reset --hard master^ # or rebase # make the bugfix branch (assuming it's still on the tip) git branch bugfix master # and remove the commit from master (assuming it's still on the tip) git checkout master git reset --hard master^ # or if the bugfix is composed of n commits, master~n # rebase the bugfix branch to the right place git rebase --onto &lt;SHA1 of merge base&gt; master bugfix </code></pre> <p>If the history <em>has</em> been published, all you can do is cherry-pick the bugfix onto the paypal branch, and remember to do it right the next time:</p> <pre><code>git checkout paypal git cherry-pick &lt;SHA1 of bugfix&gt; </code></pre>
 

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