Skip to content

Instantly share code, notes, and snippets.

@lukerandall
Last active December 14, 2024 22:06
Show Gist options
  • Save lukerandall/ce165655c8f5cbbd6e343917764f7c17 to your computer and use it in GitHub Desktop.
Save lukerandall/ce165655c8f5cbbd6e343917764f7c17 to your computer and use it in GitHub Desktop.
function jjpr
set rev $argv[1]
if test -z "$rev"
set rev "@"
end
set bookmark $argv[2]
if test -z "$bookmark"
jj git push -c $rev
set bookmark (jj log -T "bookmarks" --no-graph -r $rev | tr -d '\n')
else
jj bookmark create $bookmark -r $rev
jj git push --bookmark $bookmark --allow-new
end
gh pr create --head $bookmark
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment