forked from mirrors/jj
docs: use git switch/restore
in command-equivalence table
IIUC, the consensus in the Git project is that the overloaded nature of `git checkout` for many use cases was a mistake, and `git switch/restore` are meant to replace it.
This commit is contained in:
parent
6a1bb1c0a9
commit
01755176c6
1 changed files with 4 additions and 3 deletions
|
@ -178,7 +178,7 @@ parent.
|
|||
<tr>
|
||||
<td>Discard working copy changes in some files</td>
|
||||
<td><code>jj restore <paths>...</code></td>
|
||||
<td><code>git checkout -- <paths>...</code></td>
|
||||
<td><code>git restore <paths>...</code> or <code>git checkout HEAD -- <paths>...</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit description (commit message) of the current change</td>
|
||||
|
@ -199,8 +199,9 @@ parent.
|
|||
<tr>
|
||||
<td>Start working on a new change based on the <main> branch</td>
|
||||
<td><code>jj co main</code></td>
|
||||
<td><code>git checkout -b topic main</code> (may need to stash or commit
|
||||
first)</td>
|
||||
<td><code>git switch -c topic main</code> or
|
||||
<code>git checkout -b topic main</code> (may need to stash or commit
|
||||
first)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move branch A onto branch B</td>
|
||||
|
|
Loading…
Reference in a new issue