Commit Graph

20 Commits

Author SHA1 Message Date
Vincent Ging Ho Yim
967adbeb5a docs/git-command-table: use Markdown link syntax 2026-05-13 01:07:11 +00:00
Vincent Ging Ho Yim
2c03627fcc docs/git-command-table: leave unpopulated Notes YAML keys with empty values
Empty values render correctly as empty cells in the HTML table (whereas omitting the
`Notes` key renders as 'nan').
2026-05-13 01:07:11 +00:00
Vincent Ging Ho Yim
35c71a6b15 docs/git-command-table: remove extraneous quotes wrapping YAML value 2026-05-13 01:07:11 +00:00
Gabriel Goller
fae9b2b2cf docs: document revset-based tag filtering as alternative to git tag --contains
Add documentation showing how `jj tag list -r` with revset expressions
can be used to filter tags, replacing the need for dedicated flags like
`git tag --contains` or `git tag --merged`. For example,
`jj tag list -r 'REV::'` lists tags whose targets descend from REV.

Tag operations were missing entirely from the Git command comparison
table, so this also adds entries for listing, creating, and deleting
tags alongside the filtering equivalents. The `jj tag list` help text
and the revsets doc both gain examples demonstrating these patterns.
2026-04-01 12:56:48 +00:00
Poliorcetics
5e872bdeac docs: mention "pickaxe" for git log -G to make search easier
I knew it was an available feature and I still spent a few minutes reading the command table to find it because I only remembered the "pickaxe" term and didn't think to look for the short flag
2026-03-11 12:43:32 +00:00
Martin von Zweigbergk
bfee2aeaf3 arrange: unhide command
Now that the command support reordering and abandoning commits, I
think it's already sufficient to make it useful, so let's unhide it.

Closes #1531
2026-02-24 16:46:41 +00:00
Yuya Nishihara
b8c0317814 revset: rename diff_contains() to diff_lines()
In #8365, we agreed that the name "diff_contains" is confusing because it
implies substring matching. I think "diff_lines()" is better since it clarifies
that the pattern matches line by line, and doesn't include confusing words. I
think diff_contains_line() is also good, but it seemed too detailed compared to
the other revset functions.
2026-01-14 06:04:26 +00:00
Vincent Ging Ho Yim
a8e7a87785 docs/git-command-table: update jj undo entry and add jj op revert entry
`jj undo` (without the deprecated positional argument) now only undoes the most recent
operation. To undo an earlier operation we should use `jj op revert` instead.
2026-01-09 08:05:31 +00:00
Yuya Nishihara
e921791574 cli: bookmark: add --remote argument to track/untrack, deprecate name@remote
These two are the last commands which don't support logical operators in string
patterns. The old <kind>:<name>@<remote> syntax had various problems including:

 1. substring patterns look weird (e.g. `substring:x@y` means `*x*@*y*`)
 2. cannot express "all but <name> for all remotes" (e.g. `(~gh-pages)@(*)`)

In addition to that, the revset parser doesn't support `<name>@<remote>`
prefixed by `<kind>:`.

This patch introduces separate --remote argument to address these problems. The
default is `glob:*` (or `~git`), so we wouldn't have to specify the remote in
many cases. One caveat is that `jj bookmark track` is not idempotent if there
are multiple remotes:

    # there are two remotes: origin and upstream,
    # and only foo@origin exists
    $ jj bookmark track foo
    # tracks foo@origin and creates new local bookmark foo
    $ jj bookmark track foo
    # tracks absent foo@upstream as we now have a local bookmark

This is wild. We might want to add a flag or a new command to track absent
remote bookmarks to push.

"Unmatched names" warnings are now emitted for bookmark and remote names
separately. To keep the implementation simple, the search space isn't restricted
by the other parameter. For example, "jj bookmark track foo --remote=bar" won't
show a warning if "foo" exists locally or in any remote.

Closes #4260
2025-12-13 01:32:49 +00:00
Björn Kautler
17145beb76 docs: improve Git command table 2025-11-18 00:00:45 +00:00
Martin von Zweigbergk
32aee9dbdf cli: deprecate --destination/-d in favor of --onto/-o
As we have discussed many times on Discord and GitHub, `--destination`
is not a great name because `--insert-before` and `--insert-after` are
also destinations. The most popular alternative seems to be
`--onto`. We already use that term in descriptions in several places,
such as in the help text for `rebase -d` where we say "The revision(s)
to rebase onto". This patch therefore renames the `--destination` flag
to `--onto`.

The short name naturally becomes `-o`. That is perhaps a little
unfortunate because it's a common short name for `--output <file>`
arguments, but we don't use that anywhere so it seems fine.

Perhaps we should also rename `--source` (used by `rebase` and `fix`)
to something else. Perhaps the most obvious name is `--descendants`,
but the short form would be `-d`, which is of course already taken by
`--destination` in the case of `rebase`. Either way, I'm leaving that
rename for later. It would be good to do it before next release if we
are going to do it, though.

Closes #7941
2025-11-08 14:56:37 +00:00
Dinu Blanovschi
ac4704278e docs: Add untrack command for Jujutsu in git command table 2025-09-30 18:16:15 +00:00
Matt T. Proud
3c20da336d docs: provide analogue for git checkout
This commit includes a jj recipe for the Git command table that is
approximately equivalent to Git's checkout command, which can be used to
examine source code at named revision or branch.  This is indispensible
for learn-by-doing types who are curious how to remap Git usage back
onto jj with minimal effort.
2025-09-08 20:57:26 +00:00
Remo Senekowitsch
ec5c135387 git: colocate repos by default
Closes https://github.com/jj-vcs/jj/issues/7189

Colocated repos have some advantages and some disadvantages. On the
whole, I think making Git repos colocated by default is a better
trade-off, especially for new users. With the `git.colocate` setting,
(experienced) users can easily change this according to preference.

A non-exhaustive list of pros and cons of colocated repos:

pros:
* Many code editors show the changes one is currently working on based
  on Git's "dirty worktree".
* There are a lot of tools that integrate with Git which don't work at
  all in non-colocated repositories.
* There are a lot of Git features that Jujutsu doesn't have yet. When
  users ask for them, the answer is usually: "Just colocate your repo
  and run git directly for now." It's a strength that Jujutsu can focus
  on what makes it special and not have to rush the reimplementation of
  every niche feature of Git. Examples: `git rebase` tracking file
  renames, `git bisect`, `git tag`, `git range-diff`, submodules.

cons:
* Jujutsu performs worse in colocated repositories with lots of refs,
  because of the automatic `jj git import`.
* Colocated repos make branch@git references show up in Jujutsu output,
  which is usually just aesthetically displeasing or possibly even
  confusing to inexperienced users.
* Interleaving jj and (mutating) git commands can lead to confusing
  situations. Examples:
  * Creating a commit with git instead of jj will often leave a
    duplicate "work in progress" commit in Jujutsu's log.
  * Some IDEs periodically run `git fetch` in the background. This can
    lead to conflicted branches and divergent change IDs, something many
    people struggle with.
2025-09-04 11:26:28 +00:00
Remo Senekowitsch
b605639c49 cli: add redo command
This is the natural counterpart of `jj undo`. Adding `jj redo` closes
the last gap in functionality to the "undo" features of typical GUI
applications. This is much more intuitive to new users and useful than
the previous undo semantics. (Which are preserved as `jj op revert`.)

Related feature request "jj undo ergonomics":
https://github.com/jj-vcs/jj/issues/3700
2025-08-26 13:50:38 +00:00
Remo Senekowitsch
36ee36ce78 op: undo: rename to revert
This paves the way for the semantics of `jj undo` and `jj op revert` to
evolve independently. `jj op revert` is going to stay the low-level
command to apply the inverse of any operation. The new name is
consistent with `jj revert`, which applies the inverse of a commit.

`jj undo` on the other hand is planned to become a higher-level command,
which is more similar to, say, Ctrl+Z in typical GUI applications.
Running `jj undo` repeatedly will revert progressively older operations,
allowing the user to walk backwards in time. At the same time, `jj undo`
will lose the abilitly to revert arbitrary operations, to keep its
semantics simple and intuitive.

Related feature request "jj undo ergonomics":
https://github.com/jj-vcs/jj/issues/3700
2025-08-15 21:31:15 +00:00
raylu
0921975dcf docs: Add git log -G to git command table 2025-07-02 03:38:59 +00:00
Alper Cugun
0fe7b3a428 docs: Remove deprecated backout command from git table
Change default location for revert as suggested by @emilazy
2025-05-09 15:26:53 +00:00
Vincent Ging Ho Yim
24ab60b1c2 docs: split notes on jj commands into new column in Git command table 2025-04-21 00:45:01 +00:00
Vincent Ging Ho Yim
e90727b34d docs: convert Git command table from HTML to YAML
The YAML format is much easier to maintain and allows using Markdown instead of having
to escape symbols such as < and >.
2025-04-21 00:45:01 +00:00