ok/jj
1
0
Fork 0
forked from mirrors/jj

Deployed e9655db to prerelease with MkDocs 1.5.3 and mike 2.0.0

This commit is contained in:
jj-docs[bot] 2024-03-11 16:25:46 +00:00
parent 2f978eb498
commit fcb4ac9d6b
6 changed files with 16 additions and 13 deletions

View file

@ -1591,9 +1591,8 @@ try <code>jj rebase -s all:commit_with_local_changes+ -d main</code>
(note the <code>+</code>) to move them all at once.</p>
<p>An alternative workflow would be to rebase the commit with local changes on
top of the PR you're working on and then do <code>jj new commit_with_local_changes</code>.
You'll then need to use <code>jj new --before</code> to create new commits
and <code>jj move --to</code>
to move new changes into the correct commits.</p>
You'll then need to use <code>jj new --before</code> to create new commits and
<code>jj squash --into</code> to move new changes into the correct commits.</p>
<h3 id="i-accidentally-changed-files-in-the-wrong-commit-how-do-i-move-the-recent-changes-into-another-commit">I accidentally changed files in the wrong commit, how do I move the recent changes into another commit?<a class="headerlink" href="#i-accidentally-changed-files-in-the-wrong-commit-how-do-i-move-the-recent-changes-into-another-commit" title="Permanent link">&para;</a></h3>
<p>Use <code>jj obslog -p</code> to see how your working-copy commit has evolved. Find the
commit you want to restore the contents to. Let's say the current commit (with

View file

@ -5533,7 +5533,7 @@ repository.</li>
<li><code>show</code> — Show commit description and changes in a revision</li>
<li><code>sparse</code> — Manage which paths from the working-copy commit are present in the working copy</li>
<li><code>split</code> — Split a revision in two</li>
<li><code>squash</code> — Move changes from a revision into its parent</li>
<li><code>squash</code> — Move changes from a revision into another revision</li>
<li><code>status</code> — Show high-level repo status</li>
<li><code>tag</code> — Manage tags</li>
<li><code>util</code> — Infrequently used commands such as for generating shell completions</li>
@ -6774,8 +6774,10 @@ commit. This is true in general; it is not specific to this command.</p>
</li>
</ul>
<h2 id="jj-squash"><code>jj squash</code><a class="headerlink" href="#jj-squash" title="Permanent link">&para;</a></h2>
<p>Move changes from a revision into its parent</p>
<p>After moving the changes into the parent, the child revision will have the same content state as before. If that means that the change is now empty compared to its parent, it will be abandoned. Without <code>--interactive</code>, the child change will always be empty.</p>
<p>Move changes from a revision into another revision</p>
<p>With the <code>-r</code> option, moves the changes from the specified revision to the parent revision. Fails if there are several parent revisions (i.e., the given revision is a merge).</p>
<p>With the <code>--from</code> and/or <code>--into</code> options, moves changes from/to the given revisions. If either is left out, it defaults to the working-copy commit. For example, <code>jj squash --into @--</code> moves changes from the working-copy commit to the grandparent.</p>
<p>If, after moving changes out, the source revision is empty compared to its parent(s), it will be abandoned. Without <code>--interactive</code>, the source revision will always be empty.</p>
<p>If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used.</p>
<p>If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.</p>
<p><strong>Usage:</strong> <code>jj squash [OPTIONS] [PATHS]...</code></p>
@ -6786,6 +6788,8 @@ commit. This is true in general; it is not specific to this command.</p>
<h6 id="options_42"><strong>Options:</strong><a class="headerlink" href="#options_42" title="Permanent link">&para;</a></h6>
<ul>
<li><code>-r</code>, <code>--revision &lt;REVISION&gt;</code> — Revision to squash into its parent (default: @)</li>
<li><code>--from &lt;FROM&gt;</code> — Revision to squash from (default: @)</li>
<li><code>--into &lt;INTO&gt;</code> — Revision to squash into (default: @)</li>
<li><code>-m</code>, <code>--message &lt;MESSAGE&gt;</code> — The description to use for squashed revision (don't open editor)</li>
<li>
<p><code>-i</code>, <code>--interactive</code> — Interactively choose which parts to squash</p>

View file

@ -1527,7 +1527,7 @@ parent.</p>
</tr>
<tr>
<td>Abandon the parent of the working copy, but keep its diff in the working copy</td>
<td><code>jj move --from @-</code></td>
<td><code>jj squash --from @-</code></td>
<td><code>git reset --soft HEAD~</code></td>
</tr>
<tr>
@ -1590,13 +1590,13 @@ parent.</p>
</tr>
<tr>
<td>Move the diff in the working copy into an ancestor</td>
<td><code>jj move --to X</code></td>
<td><code>jj squash --into X</code></td>
<td><code>git commit --fixup=X; git rebase -i --autosquash X^</code></td>
</tr>
<tr>
<td>Interactively move part of the diff in an arbitrary change to another
arbitrary change</td>
<td><code>jj move -i --from X --to Y</code></td>
<td><code>jj squash -i --from X --into Y</code></td>
<td>Not supported</td>
</tr>
<tr>

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -1789,9 +1789,9 @@ line. Unlike <code>jj squash -i</code>, which left the content state of the comm
unchanged, <code>jj diffedit</code> (typically) results in a different state, which means
that descendant commits may have conflicts.</p>
<p>Other commands for rewriting contents of existing commits are <code>jj split</code>, <code>jj
unsquash -i</code> and <code>jj move -i</code>. Now that you've seen how <code>jj squash -i</code> and <code>jj
diffedit</code> work, you can hopefully figure out how those work (with the help of
the instructions in the diff).</p>
unsquash -i</code>. Now that you've seen how <code>jj squash -i</code> and <code>jj diffedit</code> work,
you can hopefully figure out how those work (with the help of the instructions
in the diff).</p>