Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The steps you've outlined are basically correct. The <code>--dir</code> option can be useful if you need to direct the output to, say, a shared drive. The <code>--series</code> (<code>-s</code>) option is helpful if you want to import the whole patch set. I use this a lot at work to initialize an stg git working copy on a new machine:</p> <pre><code># On Machine A (existing StGit repo with all patches applied) $ stg export --dir /y/projects/ttc_dev_stg_patches/master Checking for changes in the working directory ... done # On Machine B ('pristine' StGit repo with no patches) $ stg series [&lt;-- should have no output!] $ stg import -s /y/projects/ttc_dev_stg_patches/master/series Checking for changes in the working directory ... done Importing patch "remove-stl-at" ... Invoking the editor: "vim .stgitmsg.txt" ... done done Importing patch "wldap32-fix" ... Invoking the editor: "vim .stgitmsg.txt" ... done done Importing patch "cmake-fixes" ... Invoking the editor: "vim .stgitmsg.txt" ... done done Now at patch "cmake-fixes" </code></pre> <p>If you don't want to import <em>every</em> patch, you can specify them individually as you did in your example.</p> <p>Another common need is to synchronize patches in multiple working copies (possibly on different machines). <code>stg sync</code> is the command to use in this case:</p> <pre><code># On Machine B (existing StGit repo) $ stg series + remove-stl-at + wldap32-fix &gt; cmake-fixes $ stg sync --all -s /y/projects/ttc_dev_stg_patches/master/series Checking for changes in the working directory ... done Popping patches "cmake-fixes" - "wldap32-fix" ... done Synchronising "remove-stl-at" ... done (updated) Fast-forwarded patch "wldap32-fix" Synchronising "wldap32-fix" ... done Fast-forwarded patch "cmake-fixes" Synchronising "cmake-fixes" ... done (updated) </code></pre> <p>As far as the error about trying to uncommit a revision that has more than one parent: you basically can't do this. From the <a href="http://www.procode.org/stgit/doc/stg-uncommit.html" rel="nofollow noreferrer">stg-uncommit(1)</a> man page:</p> <blockquote> <p>Only commits with exactly one parent can be uncommitted; in other words, you can't uncommit a merge.</p> </blockquote> <p>This makes sense. If the history is not linear, StGit has no way of knowing which parent's commits it should use. Depending on your needs, a possible workaround might be to create a temporary branch from one of the parents and cherry-pick the commits you need off of the other parent. This will create a linear history that you can then run <code>stg uncommit</code> on to create a patch series. This might be okay if you're just trying to generate a patch set that will apply cleanly to some particular source tree snapshot. However, you're quite likely to run into trouble with this approach if you're doing anything more complex than that. (It's a hard problem; see <a href="https://stackoverflow.com/questions/2285699/git-how-to-create-patches-for-a-merge">this question</a> for more perspective.)</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