diff --git a/README.md b/README.md index 03999e9e9..be5e1536f 100644 --- a/README.md +++ b/README.md @@ -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). - - + + ### Operations update the repo first, then possibly the working copy @@ -97,8 +97,8 @@ Basic conflict resolution: Juggling conflicts: - - + + ### Automatic rebase diff --git a/demos/demo_juggle_conflicts.sh b/demos/demo_juggle_conflicts.sh index f5450bdef..677b7b7af 100755 --- a/demos/demo_juggle_conflicts.sh +++ b/demos/demo_juggle_conflicts.sh @@ -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' ' diff --git a/demos/demo_working_copy.sh b/demos/demo_working_copy.sh index 30f391dc3..64160e971 100755 --- a/demos/demo_working_copy.sh +++ b/demos/demo_working_copy.sh @@ -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 diff --git a/docs/branches.md b/docs/branches.md index ad48dac29..586258736 100644 --- a/docs/branches.md +++ b/docs/branches.md @@ -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 diff --git a/docs/git-comparison.md b/docs/git-comparison.md index e3b548460..b0ef9f2f7 100644 --- a/docs/git-comparison.md +++ b/docs/git-comparison.md @@ -259,27 +259,27 @@ parent. List branches - jj branches + jj branch list git branch Create a branch - jj branch <name> -r <revision> + jj branch create <name> -r <revision> git branch <name> <revision> Move a branch forward - jj branch <name> -r <revision> + jj branch set <name> -r <revision> git branch -f <name> <revision> Move a branch backward or sideways - jj branch <name> -r <revision> --allow-backwards + jj branch set <name> -r <revision> --allow-backwards git branch -f <name> <revision> Delete a branch - jj branch --delete <name> + jj branch delete <name> git branch --delete <name> diff --git a/src/commands.rs b/src/commands.rs index 6b1bc2a3e..33bda8856 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -2919,7 +2919,8 @@ fn cmd_status( } writeln!( ui, - " Use `jj branches` to see details. Use `jj branch -r ` to resolve." + " Use `jj branch list` to see details. Use `jj branch set -r ` 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." )?; }