logoalt Hacker News

diathyesterday at 9:37 PM4 repliesview on HN

So... git rebase -i?


Replies

idoubtityesterday at 10:23 PM

No, more like:

    git rebase -i
    # squash all the commits (e.g. in vim with ctrl-v)
    git reset HEAD^
    git add -p
    # interactively pickup the RED hunks
    git ci -m RED
The main difference to jj is that the RED commit is created later with git.
show 1 reply
nomelyesterday at 9:40 PM

Definitely not. Switch to a previous commit, make edits, changes propagate into the future commits (including into a git repo if you wish [1])

Jj is not git and is not a git tool, it just (thankfully) uses git as a backend, so you can still carry on with the rest of the world.

[1] https://news.ycombinator.com/item?id=47765759

show 2 replies
9029yesterday at 9:50 PM

I'd recommend reading the post, it's not that long

show 1 reply
ai_slop_hateryesterday at 9:49 PM

git rebase -i kinda sucks once you tried jj.