Skip to content

Commit

Permalink
Remove references to jj checkout
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
steveklabnik committed Feb 3, 2024
1 parent c3d4848 commit aa4b7a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/typing-less-at-the-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ long names, but you may want to take advantage of some of the aliases that
exist. For example:

```console
> jj checkout main
> jj co main
> jj status
> jj st
```

Same thing. But one of the coolest shortcuts is hard to represent here, because
Expand All @@ -29,10 +29,9 @@ you only need to share the amount of the ID that's unique in the repository to
commands. So these are all equivalent:

```console
> jj checkout main
> jj co main
> jj co 0262ab43
> jj co 0
> jj new main
> jj new 0262ab43
> jj new 0
```

If there's another ID starting with `0` in the repository, it would show `02` in
Expand Down
14 changes: 8 additions & 6 deletions src/working-with-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,15 @@ if you made some changes right now? `HEAD` is still on our pull request branch,
which we have deleted, right? `git` would have warned us about a detatched `HEAD`
by deleting the branch (I hope, I think so, I didn't bother checking.)

We can use `jj checkout` to move `@`:
My `git` brain wants to do some sort of "check out `main` so that `@` is the tip
of it," but that's not really the right way to think about it. There is a
`jj checkout` because it is just a subset of `jj new`. After all, we aren't
thinking in branches. We are thinking in changesets. If I want to start doing
a new change on top of `main`, we should just say that:

```console
> jj checkout main
Working copy now at: pqtmqtnu 5c04adb7 (empty) (no description set)
Parent commit : uyovmwoq 41f8c46c main | (empty) Merge pull request #2 from steveklabnik/push-wzqkzmwoxpmn
> jj new main
Working copy now at: qqzrpmrs d2120f55 (empty) (no description set)
Parent commit : xmmnqkum 2a40cce2 some changes
Added 0 files, modified 1 files, removed 0 files
```

Now we're at a new change on top of `main`.

0 comments on commit aa4b7a5

Please sign in to comment.