Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If your situation is:</p> <pre><code> x--x--x--x (master, need patch) \ y1--y2 new_auth_system, with y1 containing some patches *and* updates and y2 containing massive refactoring </code></pre> <p>I would recommand first:<br> (if you haven't pushed <code>new_auth_system</code> already)</p> <ul> <li>a <code>rebase --interactive</code> to split y1 into y1a (with only your patches) and y1b (updates), and y2 in y2a (more patches) and y2b (massive refactoring)</li> </ul> <pre> git checkout new_auth_system git rebase -i y1^ x--x--x--x (master, need patch) \ y1a--y1b--y2a--y2b new_auth_system, with y1a containing only patches y1b containing only updates y2a containing only patches y2a containing refactoring </pre> <ul> <li>a <code>rebase --interactive</code> to reorder 'y' commits (patches first, updates and refactoring second)</li> </ul> <pre> git checkout new_auth_system git rebase -i y1a^ x--x--x--x (master, need patch) \ y1a--y2a--y1b--y2b new_auth_system, with patches first (y1a, y2a) updates and refactoring second </pre> <ul> <li>a git merge to integrate those patches in <code>master</code>:</li> </ul> <pre> x--x--x--x------x' (master, with patches) \ / y1a--y2a--y1b--y2b new_auth_system, with patches first, updates and refactoring second </pre> <p>It is better than trying to isolate some files from one branch to another: <a href="https://stackoverflow.com/questions/487753/how-to-realise-a-deployment-branch-in-git/487788#487788">Git reasons in term of project</a> (a collection of files under a common tree), not in term of individual files.</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