Skip to content

feat(cli): add --track flag to 'bookmark create' command to track aft…#9178

Open
joerdav wants to merge 1 commit intojj-vcs:mainfrom
joerdav:track-flag
Open

feat(cli): add --track flag to 'bookmark create' command to track aft…#9178
joerdav wants to merge 1 commit intojj-vcs:mainfrom
joerdav:track-flag

Conversation

@joerdav
Copy link
Copy Markdown

@joerdav joerdav commented Mar 24, 2026

…er creation

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

@joerdav joerdav marked this pull request as ready for review March 24, 2026 11:35
@joerdav joerdav requested a review from a team as a code owner March 24, 2026 11:35
@joerdav joerdav force-pushed the track-flag branch 2 times, most recently from 1493b66 to f762a8b Compare March 24, 2026 12:07
@yuja
Copy link
Copy Markdown
Contributor

yuja commented Mar 24, 2026

See #8559 for the previous discussion. I have no idea how this flag should be called, but it should take REMOTE name pattern.

@joerdav
Copy link
Copy Markdown
Author

joerdav commented Mar 24, 2026

Ah okay, my initial search for issues that propose this already clearly wasn't thorough enough!

To add to the use case, I'm using my fork at the moment, because my workflow means that I'm almost exclusively creating bookmarks to then push to a remote.

jj commit -m "feat: my new feature"
jj bookmark create -r@- --track my-new-feature
jj git push

I appreciate this may just be a convenience for me and may not be applicable to other people.

@PhilipMetzger
Copy link
Copy Markdown
Contributor

also squash the docs commit into the initial commit adding the feature, a second commit is not needed.

@yuja
Copy link
Copy Markdown
Contributor

yuja commented Mar 25, 2026

Maybe you know, but jj git push --named my-new-feature=@- also works if you don't need a local bookmark until you push.

@joerdav
Copy link
Copy Markdown
Author

joerdav commented Mar 25, 2026

Maybe you know, but jj git push --named my-new-feature=@- also works if you don't need a local bookmark until you push.

That is certainly useful, thanks for that! I still believe there is use for the --track flag, but appreciate there is more nuance to the problem than my implementation provides. If more discussion is needed and would be best had elsewhere I'm happy to close this, or if we think there is a route for this to become something of a more complete solution then I'm happy to see that through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants