forked from mirrors/jj
docs: update to use new jj branch
syntax
This commit is contained in:
parent
e8e03880cf
commit
a15192c05b
6 changed files with 19 additions and 18 deletions
|
@ -61,8 +61,8 @@ working copy or any other commit. It also means that you can always check out a
|
|||
different commit without first explicitly committing the working copy changes
|
||||
(you can even check out a different commit while resolving merge conflicts).
|
||||
|
||||
<a href="https://asciinema.org/a/OywNvPxShG4Zmul2eNcDiL3nj" target="_blank">
|
||||
<img src="https://asciinema.org/a/OywNvPxShG4Zmul2eNcDiL3nj.svg" />
|
||||
<a href="https://asciinema.org/a/XVJwcGbZek4cfk3510iQdloD8" target="_blank">
|
||||
<img src="https://asciinema.org/a/XVJwcGbZek4cfk3510iQdloD8.svg" />
|
||||
</a>
|
||||
|
||||
### Operations update the repo first, then possibly the working copy
|
||||
|
@ -97,8 +97,8 @@ Basic conflict resolution:
|
|||
</a>
|
||||
|
||||
Juggling conflicts:
|
||||
<a href="https://asciinema.org/a/sTQnMCthulo2NfwRnHX30qegq" target="_blank">
|
||||
<img src="https://asciinema.org/a/sTQnMCthulo2NfwRnHX30qegq.svg" />
|
||||
<a href="https://asciinema.org/a/efo1dbUuERDnDk1igaVi9TZVb" target="_blank">
|
||||
<img src="https://asciinema.org/a/efo1dbUuERDnDk1igaVi9TZVb.svg" />
|
||||
</a>
|
||||
|
||||
### Automatic rebase
|
||||
|
|
|
@ -6,13 +6,13 @@ parse_args "$@"
|
|||
new_tmp_dir
|
||||
jj init
|
||||
echo "first" > file
|
||||
jj branch first
|
||||
jj branch create first
|
||||
jj close -m 'first'
|
||||
echo "second" > file
|
||||
jj branch second
|
||||
jj branch create second
|
||||
jj close -m 'second'
|
||||
echo "third" > file
|
||||
jj branch third
|
||||
jj branch create third
|
||||
jj close -m 'third'
|
||||
|
||||
run_demo 'Juggling conflicts' '
|
||||
|
|
|
@ -26,7 +26,7 @@ run_command "jj log"
|
|||
pause 5
|
||||
run_command "# Add a branch so we can easily refer to this"
|
||||
run_command "# commit:"
|
||||
run_command "jj branch goodbye"
|
||||
run_command "jj branch create goodbye"
|
||||
pause 2
|
||||
run_command "jj log"
|
||||
pause 3
|
||||
|
|
|
@ -8,7 +8,7 @@ move them without affecting the target revision's identity. Branches
|
|||
automatically move when revisions are rewritten (e.g. by `jj rebase`). You can
|
||||
pass a branch's name to commands that want a revision as argument. For example,
|
||||
`jj co main` will check out the revision pointed to by the "main" branch. Use
|
||||
`jj branches` to list branches and `jj branch` to create, move, or delete
|
||||
`jj branch list` to list branches and `jj branch` to create, move, or delete
|
||||
branches. There is currently no concept of an active/current/checked-out branch.
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ remote's state will be propagated to the local branch. Let's say you run
|
|||
target is now ahead of the local record in `main@origin`. That will update
|
||||
`main@origin` to the new target. It will also apply the change to the local
|
||||
branch `main`. If the local target had also moved compared to `main@origin`
|
||||
(probably because you had run `jj branch main`), then the two updates will be
|
||||
(probably because you had run `jj branch set main`), then the two updates will be
|
||||
merged. If one is ahead of the other, then that target will be the new target.
|
||||
Otherwise, the local branch will be conflicted (see next section for details).
|
||||
|
||||
|
@ -43,7 +43,7 @@ Otherwise, the local branch will be conflicted (see next section for details).
|
|||
|
||||
Branches can end up in a conflicted state. When that happens, `jj status` will
|
||||
include information about the conflicted branches (and instructions for how to
|
||||
mitigate it). `jj branches` will have details. `jj log` will show the branch
|
||||
mitigate it). `jj branch list` will have details. `jj log` will show the branch
|
||||
name with a question mark suffix (e.g. `main?`) on each of the conflicted
|
||||
branch's potential target revisions. Using the branch name to look up a revision
|
||||
will resolve to all potential targets. That means that `jj co main` will error
|
||||
|
|
|
@ -259,27 +259,27 @@ parent.
|
|||
</tr>
|
||||
<tr>
|
||||
<td>List branches</td>
|
||||
<td><code>jj branches</code></td>
|
||||
<td><code>jj branch list</code></td>
|
||||
<td><code>git branch</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create a branch</td>
|
||||
<td><code>jj branch <name> -r <revision></code></td>
|
||||
<td><code>jj branch create <name> -r <revision></code></td>
|
||||
<td><code>git branch <name> <revision></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move a branch forward</td>
|
||||
<td><code>jj branch <name> -r <revision></code></td>
|
||||
<td><code>jj branch set <name> -r <revision></code></td>
|
||||
<td><code>git branch -f <name> <revision></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move a branch backward or sideways</td>
|
||||
<td><code>jj branch <name> -r <revision> --allow-backwards</code></td>
|
||||
<td><code>jj branch set <name> -r <revision> --allow-backwards</code></td>
|
||||
<td><code>git branch -f <name> <revision></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete a branch</td>
|
||||
<td><code>jj branch --delete <name> </code></td>
|
||||
<td><code>jj branch delete <name> </code></td>
|
||||
<td><code>git branch --delete <name></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -2919,7 +2919,8 @@ fn cmd_status(
|
|||
}
|
||||
writeln!(
|
||||
ui,
|
||||
" Use `jj branches` to see details. Use `jj branch <name> -r <rev>` to resolve."
|
||||
" Use `jj branch list` to see details. Use `jj branch set <name> -r <rev>` to \
|
||||
resolve."
|
||||
)?;
|
||||
}
|
||||
if !conflicted_remote_branches.is_empty() {
|
||||
|
@ -2935,7 +2936,7 @@ fn cmd_status(
|
|||
}
|
||||
writeln!(
|
||||
ui,
|
||||
" Use `jj branches` to see details. Use `jj git pull` to resolve."
|
||||
" Use `jj branch list` to see details. Use `jj git pull` to resolve."
|
||||
)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue