martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
9.46k stars 324 forks source link

Documentation for `jj git push` is missing important details #3672

Open wmjdgla opened 6 months ago

wmjdgla commented 6 months ago

https://martinvonz.github.io/jj/v0.16.0/cli-reference/#jj-git-push

Push to a Git remote

By default, pushes any branches pointing to remote_branches(remote=)..@.

However, I only found out about following details on the command elsewhere: https://martinvonz.github.io/jj/v0.16.0/github/#using-a-named-branch The example shows that the command pushes all commits in the current branch, up to and including the commit that has the branch name. All commits after that are ignored.

https://martinvonz.github.io/jj/v0.16.0/github/#rewriting-commits Here, it shows that any commit to be pushed that are different from those on remote are force pushed.

martinvonz commented 6 months ago

I think the help text actually includes those details, but I agree that it could elaborate a bit.

FYI, you can try jj log -r remote_branches(remote=origin)..@ (assuming your remote is called "origin") before pushing next time to see which commits that revset resolves to.