Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've never used the <code>subtree</code> strategy, so maybe this is a suboptimal solution (and maybe it won't work ^^), but you could apply all the new commits in <code>upstream_lib</code> to a temporary branch off of the <code>master</code> line and then merge that. What I have in mind doesn't fundamentally fix your situation, so you'll have to do this kind of "manual merge" every time you want to pull in new changes, but here's how it works:</p> <ol> <li>Determine the fake common ancestor in the <code>master</code> ancestry line, say <code>master~100</code>.</li> <li>Determine the fake common ancestor in the <code>upstream_lib</code> line, say <code>upstream_lib~150</code>.</li> <li>Make a throwaway copy of the <code>upstream_lib</code> branch: <code>git branch --no-track new_upstream_lib upstream_lib</code></li> <li><p>Rebase <code>new_upstream_lib</code> onto <code>master~100</code> using the recursive strategy with the subtree option. (I don't think you can just use the subtree strategy because, as you say, the <code>lib</code> directory in <code>master</code> has changes of its own.) Here's a completely untested command for this:</p> <pre><code>git rebase -s recursive -X subtree=lib --onto master~100 upstream_lib~150 new_upstream_lib </code></pre> <p>Note that <code>new_upstream_lib</code> now has the whole <code>master</code> tree in it, even though you only care about the <code>lib</code> directory.</p></li> <li>Merge it: <code>git checkout master &amp;&amp; git merge new_upstream_lib &amp;&amp; git branch -d new_upstream_lib</code>.</li> </ol>
    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.
 

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