jj-git-push(1)

NAME
jj-git-push - Push to a Git remote

SYNOPSIS
jj git push [-R|--repository] [--remote] [-b|--bookmark] [--ignore-working-copy] [--no-integrate-operation] [--all] [--ignore-immutable] [--at-operation] [--tracked] [--debug] [--deleted] [--color] [--allow-empty-description] [--quiet] [--allow-private] [--no-pager] [--config] [-r|--revision] [-c|--change] [--config-file] [--named] [--dry-run] [-o|--option] [-h|--help]

DESCRIPTION
Push to a Git remote

By default, pushes tracking bookmarks pointing to `remote_bookmarks(remote=<remote>)..@`. Use `--bookmark` to push specific bookmarks. Use `--all` to push all bookmarks. Use `--change` to generate bookmark names based on the change IDs of specific commits.

When pushing a bookmark, the command pushes all commits in the range from the remote's current position up to and including the bookmark's target commit. Any descendant commits beyond the bookmark are not pushed.

If the local bookmark has changed from the last fetch, push will update the remote bookmark to the new position after passing safety checks. This is similar to `git push --force-with-lease` - the remote is updated only if its current state matches what Jujutsu last fetched.

Unlike in Git, the remote to push to is not derived from the tracked remote bookmarks. Use `--remote` to select the remote Git repository by name. There is no option to push to multiple remotes.

Before the command actually moves, creates, or deletes a remote bookmark, it makes several [safety checks]. If there is a problem, you may need to run `jj git fetch --remote <remote name>` and/or resolve some [bookmark conflicts].

[safety checks]: https://docs.jj-vcs.dev/latest/bookmarks/#pushing-bookmarks-safety-checks

[bookmark conflicts]: https://docs.jj-vcs.dev/latest/bookmarks/#conflicts

OPTIONS

--remote <REMOTE>
    The remote to push to (only named remotes are supported) This defaults to the `git.push` setting. If that is not configured, and if there are multiple remotes, the remote named "origin" will be used.

-b, --bookmark <BOOKMARK>
    Push only this bookmark, or bookmarks matching a pattern (can be repeated) If a bookmark isn't tracking anything yet, the remote bookmark will be tracked automatically. By default, the specified pattern matches bookmark names with glob syntax. You can also use other [string pattern syntax]. [string pattern syntax]: https://docs.jj-vcs.dev/latest/revsets/#string-patterns

--all
    Push all bookmarks (including new bookmarks)

--tracked
    Push all tracked bookmarks This usually means that the bookmark was already pushed to or fetched from the [relevant remote]. [relevant remote]: https://docs.jj-vcs.dev/latest/bookmarks#remotes-and-tracked-bookmarks

--deleted
    Push all deleted bookmarks Only tracked bookmarks can be successfully deleted on the remote. A warning will be printed if any untracked bookmarks on the remote correspond to missing local bookmarks.

--allow-empty-description
    Allow pushing commits with empty descriptions

--allow-private
    Allow pushing commits that are private The set of private commits can be configured by the `git.private-commits` setting. The default is `none()`, meaning all commits are eligible to be pushed.

-r, --revision <REVSETS>
    Push bookmarks pointing to these commits (can be repeated)

-c, --change <REVSETS>
    Push this commit by creating a bookmark (can be repeated) The created bookmark will be tracked automatically. Use the `templates.git_push_bookmark` setting to customize the generated bookmark name. The default is `"push-" ++ change_id.short()`.

--named <NAME=REVISION>
    Specify a new bookmark name and a revision to push under that name, e.g. '--named myfeature=@' Automatically tracks the bookmark if it is new.

--dry-run
    Only display what will change on the remote

-o, --option <OPTION>
    Git push options

-h, --help
    Print help (see a summary with '-h')

GLOBAL OPTIONS

-R, --repository <REPOSITORY>
    Path to repository to operate on By default, Jujutsu searches for the closest .jj/ directory in an ancestor of the current working directory.

--ignore-working-copy
    Don't snapshot the working copy, and don't update it By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (`@`). If you want to avoid snapshotting the working copy and instead see a possibly stale working-copy commit, you can use `--ignore-working-copy`. This may be useful e.g. in a command prompt, especially if you have another process that commits the working copy. Loading the repository at a specific operation with `--at-operation` implies `--ignore-working-copy`.

--no-integrate-operation
    Run the command as usual but don't integrate any operations When this option is given, the operations will still be created as usual but they will not be integrated to the operation log. The working copy will also not be updated. The command will print the resulting operation ID. You can pass that to e.g. `jj --at-op` to inspect the resulting repo state, or you can pass it to `jj op restore` to restore the repo to that state. You can also pass the ID to `jj op integrate` to integrate the operation. Note that this does *not* prevent side effects outside the repo. For example, `jj git push --no-integrate-operation` will still perform the push.

--ignore-immutable
    Allow rewriting immutable commits By default, Jujutsu prevents rewriting commits in the configured set of immutable commits. This option disables that check and lets you rewrite any commit but the root commit. This option only affects the check. It does not affect the `immutable_heads()` revset or the `immutable` template keyword.

--at-operation <AT_OPERATION>
    Operation to load the repo at Operation to load the repo at. By default, Jujutsu loads the repo at the most recent operation, or at the merge of the divergent operations if any. You can use `--at-op=<operation ID>` to see what the repo looked like at an earlier operation. For example `jj --at-op=<operation ID> st` will show you what `jj st` would have shown you when the given operation had just finished. `--at-op=@` is pretty much the same as the default except that divergent operations will never be merged. Use `jj op log` to find the operation ID you want. Any unambiguous prefix of the operation ID is enough. When loading the repo at an earlier operation, the working copy will be ignored, as if `--ignore-working-copy` had been specified. It is possible to run mutating commands when loading the repo at an earlier operation. Doing that is equivalent to having run concurrent commands starting at the earlier operation. There's rarely a reason to do that, but it is possible.

--debug
    Enable debug logging

--color <WHEN>
    When to colorize output
    Possible values:

    •   always

    •   never

    •   debug

    •   auto

--quiet
    Silence non-primary command output For example, `jj file list` will still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. Warnings and errors will still be printed.

--no-pager
    Disable the pager

--config <NAME=VALUE>
    Additional configuration options (can be repeated) The name should be specified as TOML dotted keys. The value should be specified as a TOML expression. If string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted.

--config-file <PATH>
    Additional configuration files (can be repeated)