jj-git-push(1)

πŸ“¦
version 0.46.0 Β· 4 versions
, in arch rolling, nixpkgs unstable

πŸ’… jj-git-push β€” the jj git push manual, bestie edition

okay so this is the man page for jj-git-push(1) from the General Commands Manual, and it's literally all about yeeting your commits to a Git remote. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

jj-git-push β€” push to a Git remote. that's it. that's the vibe. 🫢


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

push to a Git remote. iconic behaviour, no notes. πŸ’…

by default, it pushes tracking bookmarks and tags pointing to remote_bookmarks(remote=<remote>)..@. and if you wanna change what "default" even means, you configure it via the revsets.git-push setting. use --bookmark/--tag to push specific bookmarks or tags. use --all to push, well, all of them. and use --change to generate bookmark names based on the change IDs of specific commits. we love a naming moment. ✨

when you push a bookmark or tag, the command pushes all commits in the range from the remote's current position up to and including its target commit. any descendant commits beyond the reference are not pushed. so like, no sneaky extras, bestie. πŸ™ˆ

if the local reference has changed from the last fetch, push will update the remote reference to the new position after passing safety checks. this is similar to git push --force-with-lease β€” the remote only gets updated if its current state matches what Jujutsu last fetched. so it's giving trust but verify. πŸ‘‘

unlike in Git, the remote you push to is not derived from the tracked remote bookmarks. instead you use --remote to select the remote Git repository by name. and no, there is no option to push to multiple remotes. one (or one pattern), that's the rule. πŸ’€

before the command actually moves, creates, or deletes a remote bookmark, it runs several safety checks. if there's a problem, you may need to run jj git fetch --remote <remote name> and/or resolve some bookmark conflicts. do the homework first, fr fr.

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(s) to push to (can be repeated). this defaults to the git.push setting. if that isn't configured, and if there are multiple remotes, the remote named "origin" gets used. also, by default the pattern you give matches remote names with glob syntax, e.g. --remote '*'. you can also use other string pattern syntax. 🧚
string pattern syntax: https://docs.jj-vcs.dev/latest/revsets/#string-patterns
  • -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 gets tracked automatically. by default, the 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
  • -t, --tag <TAG> β€” push only this tag, or tags matching a pattern (can be repeated). if a tag isn't tracking anything yet, the remote tag gets tracked automatically. by default, the pattern matches tag 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 and tags (including new ones). go big or go home. πŸ”₯
  • --tracked β€” push all tracked bookmarks and tags. this usually means that the bookmark or tag 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 and tags. heads up though: only tracked bookmarks and tags can be successfully deleted on the remote. a warning will be printed if any untracked bookmarks or tags on the remote correspond to missing local bookmarks or tags. πŸ‘€
  • --allow-empty-description β€” allow pushing commits with empty descriptions. no description, no problem, apparently. 😭
  • --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. πŸ’œ
  • --allow-conflicts β€” allow pushing commits that contain conflicts. chaotic, but okay. πŸ’€
  • -r, --revision <REVSETS> β€” push bookmarks and tags 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(). main character bookmark naming energy. ⭐
  • --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. peek before you leap, bestie. πŸ™ˆ
  • -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. also β€” 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. like, the push is happening, bestie. 😭
  • --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. 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 the 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).

k that's the whole thing, bestie β€” you're officially caught up on jj git push and honestly? it ate. πŸ“πŸ’–

this little love letter is from the push source, version-side of the jj-git-push(1) manual β€” mwah, see you in the group chat πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from