News for hackers. Stuff that matters.
Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Wednesday February 12, 2025 @07:05AM (#43024503)
> Git has lots of downsides, lots of power that forces you to work hard for things that should be easy.

Care to point one concrete example?

Re:jj: a Git-compatible VCS that is both simple and powerful by underdeserver on Wednesday February 12, 2025 @07:19AM (#43024598)
I'm working on a change when a review comment comes in. I want the review ping-pong to move fast so I want to pause my work on the current branch and address the review comment.

I can either stash my changes, which requires keeping a mental model of the stash queue (what if the review comments took a while and I started working on something else?) or a "wip commit", which you need to know, and you need to know how to reset and force push if you accidentally push it.

With jj, you run `jj edit`.

Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Wednesday February 12, 2025 @07:28AM (#43024694)
> I can either stash my changes, which requires keeping a mental model of the stash queue (what if the review comments took a while and I started working on something else?) or a "wip commit", which you need to know, and you need to know how to reset and force push if you accidentally push it.

You do:

git commit -m "wip"

Then, if you wish to undo the commit then:

git reset HEAD

If instead you want to update your commit with additional changes:

git commit --amend

Seriously, why are you guys advocating for replacing a tool when the problems you're actually experiencing are due to your inabilility to learn the basics of it? I mean, is jj edit any better than git commit --amend ? Does git commit --amend require more cognitive load to understand?

Re:jj: a Git-compatible VCS that is both simple and powerful by underdeserver on Wednesday February 12, 2025 @08:16AM (#43025089)
Thank you for proving my point.

What you really want to do is

git commit -anm "wip"

The -a is important because maybe you haven't staged the changes yet. The -n is important because otherwise your pre-commit hooks will run, and potentially modify your commit.

Also, what happens if some of the files were partially staged?

Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Wednesday February 12, 2025 @09:10AM (#43025569)
> What you really want to do is

No. I only need to run hit commit. The rest is just silly attempts to nitpick your way to faking complexity where there is none. You don't need to pass --all because you should know and tell what changes go into the commit. You don't need or care to skip precommit hooks, because either you don't have any or you have them and you want to run them. That's it.

Also, even your attempt to make a mountain out of a molehill ends up with a easier, smaller command line entry.

Re:jj: a Git-compatible VCS that is both simple and powerful by TheBicPen on Wednesday February 12, 2025 @01:03PM (#43027910)
I have no horse in this race but it seems to me that you're not understanding their point. JJ has a different workflow that doesn't have a concept of a staging area, for one. The fact that you don't need to make a WIP commit may not be a game-changer for you, but it demonstrates that the abstractions it provides more accurately represent the "editing a previous commit" workflow. If that's not useful to you, fine. But I think it's valuable to have tools that 1) integrate into existing (git-based) systems with low friction and 2) provide abstractions more suitable for the work I tend to do on a daily basis.
Re:jj: a Git-compatible VCS that is both simple and powerful by JTyQZSnP3cQGa8B on Wednesday February 12, 2025 @07:46AM (#43024860)
The git command line is an awful thing that should have been fixed a long time ago. jj fixes it while staying compatible.

Your examples are laughable because most serious commands are way more complicated than that and again jj fixes that gracefully.

Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Wednesday February 12, 2025 @09:11AM (#43025589)
> The git command line is an awful thing that should have been fixed a long time ago.

Again, please point out your best example that you believe proves your point.

All I see so far is shit-talking Git with abstract unsubstantiated complains to then hand-wave an alternative as the savior.

Point exactly where Git fails and what value is brought to the picture by any other alternative. Clearly Git's backend is not a issue by the way jj reuses it. So what exactly are these problems that are worth solving?

Re:jj: a Git-compatible VCS that is both simple and powerful by fragmede on Wednesday February 12, 2025 @01:54PM (#43028470)
Lol being angry that other people don't think git is easy to learn and that it's not perfect isn't going to convince them of anything other than you're an angry person.

https://ohshitgit.com/ has plenty of exmaples that you're free to disregard as being shit-talking. Meanwhile, the rest of us can admit that git has some rough edges, like how git checkout does a couple of different things, depending on the flags you pass it. That's not user friendly.

Re:jj: a Git-compatible VCS that is both simple and powerful by eska on Wednesday February 12, 2025 @10:07AM (#43026093)
The OP knows how to do this but finds it unintuitive and inconvenient. You didn’t read their comment correctly and became verbally abusive.
Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Thursday February 13, 2025 @01:06AM (#43033149)
> The OP knows how to do this but finds it unintuitive and inconvenient.

That's not a credible explanation. Amending a commit is somehow unintuitive and inconvenient but editing a commit is suddenly so much clearer and intuitive?

Re:jj: a Git-compatible VCS that is both simple and powerful by underdeserver on Wednesday February 12, 2025 @08:24AM (#43025150)
There's also another problem: The git workflow doesn't jell with the natural flow of code review.

What should that flow look like?

1. You send out a change for review. 2. You get review comments. 3. You fix the comments. 4. Repeat from #2 as many times as necessary. 5. You merge the change.

In git, how do you address review comments? You can either amend, in which case, at least on Github, you lose history while in review; or you add another commit, which essentially forces you to squash when you merge, which results in large commits.

How do you do stacked changes? How do you continue working on your feature while waiting for a change to be reviewed, and rebase the comments quickly?

With jj, it's jj edit and jj next.

Re:jj: a Git-compatible VCS that is both simple and powerful by motorest on Wednesday February 12, 2025 @09:30AM (#43025748)
> How do you do stacked changes? How do you continue working on your feature while waiting for a change to be reviewed, and rebase the comments quickly?

What? Are you actually asking this question? I mean, what answer do you need other than a basic intro to PR tutorial from the likes of GitHub or GitLab?

But to answer your question, you continue working on your feature exactly like you've been working so far. You do not need to amend or squash. You can instead do the right thing and address PR feedback by pushing individual commits. How the PR branch is merged is a separate concern, and you are free to squash or rebase or whatever you'd like, because none of this is a Git issue.

Why do you think this is an issue with Git?

Re:jj: a Git-compatible VCS that is both simple and powerful by Izkata on Wednesday February 12, 2025 @05:16PM (#43030357)
> or you add another commit, which essentially forces you to squash when you merge, which results in large commits.

Please no. Just do a normal merge instead of destroying history. Having those as separate commits is extremely useful for those of us who actually have had to dig into the history to track down why something is the way it is.