Skip to content

Commit

Permalink
demos: update, replace branch with bookmark
Browse files Browse the repository at this point in the history
The replacement is not purely mechanical, some text is also adjusted to
talk about bookmarks.
  • Loading branch information
ilyagr committed Oct 15, 2024
1 parent d2667c5 commit 5dab5e1
Show file tree
Hide file tree
Showing 15 changed files with 204 additions and 202 deletions.
10 changes: 5 additions & 5 deletions demos/demo_git_compat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ run_command "cd Hello-World"

blank

comment "By default, \"jj\" creates a local master branch tracking the remote master
branch. The other branches are only available as remote-tracking branches."
run_command "jj branch list --all"
comment "We can create a local branch tracking one of the remote branches we just
comment "By default, \"jj\" creates a local bookmark \"master\" tracking the remote master
branch. Other remote branches are only available as remote-tracking bookmarks."
run_command "jj bookmark list --all"
comment "We can create a local bookmark tracking one of the remote branches we just
fetched."
run_command "jj branch track octocat-patch-1@origin"
run_command "jj bookmark track octocat-patch-1@origin"

comment "By default, \"jj log\" excludes untracked remote branches to focus on
\"our\" commits."
Expand Down
6 changes: 3 additions & 3 deletions demos/demo_juggle_conflicts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ new_tmp_dir
(
jj init --config-toml ui.allow-init-native=true
echo "first" > file
jj branch create first
jj bookmark create first
jj commit -m 'first'
echo "second" > file
jj branch create second
jj bookmark create second
jj commit -m 'second'
echo "third" > file
jj branch create third
jj bookmark create third
jj commit -m 'third'
) >/dev/null 2>&1

Expand Down
6 changes: 3 additions & 3 deletions demos/demo_operation_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ new_tmp_dir
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon --ignore-immutable octocat-patch-1@origin
jj branch forget octocat-patch-1
jj branch track test@origin
jj bookmark forget octocat-patch-1
jj bookmark track test@origin
} > /dev/null 2>&1

comment "We are in the octocat/Hello-World repo.
Expand All @@ -18,7 +18,7 @@ run_command "jj op log"

comment "We are going to make some changes to show
how the operation log works. Let's add a file, set
a description, and rebase onto the \"test\" branch:"
a description, and rebase onto the \"test\" bookmark:"
run_command "echo stuff > new-file"
run_command "jj describe -m stuff"
run_command "jj rebase -d test"
Expand Down
6 changes: 3 additions & 3 deletions demos/demo_resolve_conflicts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ new_tmp_dir
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon --ignore-immutable test@origin
jj branch forget test
jj bookmark forget test
} > /dev/null 2>&1

comment "We are on the master branch of the
octocat/Hello-World repo:"
comment "We are on the master branch of the octocat/Hello-World repo,
represented by the \"master\" bookmark on the parent commit."
run_command "jj log"

comment "Let's make an edit that will conflict
Expand Down
8 changes: 4 additions & 4 deletions demos/demo_working_copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ new_tmp_dir
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon --ignore-immutable test@origin
jj branch forget test
jj bookmark forget test
jj abandon --ignore-immutable octocat-patch-1@origin
jj branch forget octocat-patch-1
jj bookmark forget octocat-patch-1
}> /dev/null 2>&1

comment "We are in the octocat/Hello-World repo.
Expand All @@ -25,9 +25,9 @@ comment "Because of these changes, our working copy is no longer marked as \"(em
Also, its commit ID (starting with a blue character) changed:"
run_command "jj status"

comment "Add a branch so we can easily refer to this
comment "Add a bookmark so we can easily refer to this
commit:"
run_command "jj branch create goodbye"
run_command "jj bookmark create goodbye"
run_command "jj log"

comment "Start working on a new change off of master:"
Expand Down
Binary file modified demos/git_compat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions demos/git_compat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demos/juggle_conflicts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5dab5e1

Please sign in to comment.