logoalt Hacker News

jampekkayesterday at 6:04 PM1 replyview on HN

That sounds a bit faffy. In solo or small team work git is often git pull, edit code, git commit -a, git push.

With jj you have to fetch, start new space off a bookmark, edit code, commit it, update the bookmark and finally push?


Replies

SAI_Peregrinustoday at 12:48 AM

Git pull equivalent is `jj git fetch`

Git `checkout -b` equivalent is `jj bookmark create`

`git commit -a` equivalent is `jj commit`

Git push equivalent is `jj git push`

No more faff than git, I just prefer to do things in a slightly different order. I don't usually name the branch (`git checkout -b` equivalent) until after I'm done making changes & ready for a PR. I prefer to make changes, try things out, get it working, and then rearrange the commits to have a clean history to make my reviewer's lives easier. With `git` that's an interactive rebase, which tends to require a lot of faffing about.

JJ doesn't require branches to have names. By default it just leaves bookmarks (names of branches, roughly) where they are when new changes are made, but that's easily configured. You can even have it automatically create names when you push.