I tried jj a few times but it seems to be incompatible with my workflow.
I tend to have lots of uncommitted files and changes that i want to keep around in this state while I move around branches and while having multiple change lists (jetbrains implementation) that I will commit at some point in time.
This loose, flexible way of using git seems hard to do in jj.
You can do that with just `jj split` too. The FAQ entry you linked to is for when you accidentally amended a commit and now you want to restore the bookmark to the old commit and move the changes you amended into a new commit on top instead.
I'd been concerned about that initially, but setting up some gitgnores made this a complete non problem for me. .scratch/ for a lot, *.scratch, and ig-*.
It's also so easy to go back to the change latter and remove the files (after they're already copied elsewhere, or just operations log to go get) that it's really not a problem to just let stuff get in your commits.
In git there's such a strong incentive to do things right, to make clean commits. Imo one of the huge strengths of JJ is abandoning the obsession, and having far far far better tools to clean up after.
> In git there's such a strong incentive to do things right, to make clean commits.
There is no such. There are a lot of tools to manipulate commits and WIP, such as the stash, rebase, cherry pick, extracting and applying patch. You only need clean commits for review and the main branch because that helps the whole team. Your local copy can be as messy as you want to.
I started to use JJ during the summer, and now I'm hooked. It feels much easier to do things such as reorder, squash and split commits, as well as change commit message.
And if you messed up anything, you can always undo it by using your `git reflog`. No matter what you did, you can always go back a previous state! Each state is stored as new commit.
dbbb733 (HEAD -> master) HEAD@{18}: rebase (finish): returning to refs/heads/master
dbbb733 (HEAD -> master) HEAD@{19}: rebase (pick): Commit #10.
4bf7bcd HEAD@{20}: rebase (squash): Commit #6.Commit #8.
cdc47c1 HEAD@{21}: rebase (pick): Commit #6.
2ca48d8 HEAD@{22}: rebase (squash): Commit #5.Commit #7.
6a6fccc HEAD@{23}: commit (amend): Commit #5.
86ca5f8 HEAD@{24}: rebase (edit): Commit #5.
1259a52 HEAD@{25}: rebase (reword): Second "Hi" commit.
b33f89c HEAD@{26}: rebase (reword): Second commit.
9cefee3 HEAD@{27}: rebase (pick): Commit #4.
2448f03 HEAD@{28}: rebase (pick): Fourth commit.
5340360 HEAD@{29}: rebase: fast-forward
d1406ed HEAD@{30}: rebase (start): checkout d1406ed8145dc84695eb622bc6b3fc078e8098df
50941da HEAD@{31}: commit: Commit #10.
c23819d HEAD@{32}: commit: Commit #9.
7567b18 HEAD@{33}: commit: Commit #8.
7e99e85 HEAD@{34}: commit: Commit #7.
af1f2fe HEAD@{35}: commit: Commit #6.
6bb5d98 HEAD@{36}: commit: Commit #5.
2a648f2 HEAD@{37}: commit: Commit #4.
a2b6a59 HEAD@{38}: commit: Fourth commit.
12ccd8a HEAD@{39}: commit: Second commit.
5340360 HEAD@{40}: commit (initial): First commit.
Feel like git has a reputation for being hard even for things they're not that much.
I really do want to learn and love it. It seems I love all the things which are told about it, but, I think JJ has a tutorial problem. I would really want something which focuses on concepts of it rather than workflows. May be some diagrams? I know that JJ-ists think that it is very easy to understand wall of cli printed text, with ascii trees and hash prefixes in bold, but it really isn't. Especially for target audience of tutorials (folks new to JJ).
https://jj-for-everyone.github.io is the most approachable jj tutorial I've seen. I wouldn't say it focuses on workflows, but it does take a "learn by doing" approach a bit more than the "data model first" approach it sounds like you might prefer.
It's still a young tool, it's not surprising that tutorials are a bit lacking (honestly there are surprisingly many for its age). Maybe be the change you want to see in the world and make one? (Which would be an... interesting... way to learn the tool for sure).
Same. It's how I learned Docker and Kubernetes, study the concepts, then I can ask "what's the specific command to do A,B,C" instead of an open ended "how do I do X".
Have you tried it yet? I found the tutorials a bit convoluted. But just giving it a go for a couple of days gave me more in practice than reading docs for a week could. It's not to say the docs couldn't be better - just maybe it's not as much of a barrier as you think.
I tried jj a few times but it seems to be incompatible with my workflow.
I tend to have lots of uncommitted files and changes that i want to keep around in this state while I move around branches and while having multiple change lists (jetbrains implementation) that I will commit at some point in time.
This loose, flexible way of using git seems hard to do in jj.
Some techniques for this are covered in: https://docs.jj-vcs.dev/latest/FAQ/#how-can-i-keep-my-scratc... and https://docs.jj-vcs.dev/latest/FAQ/#how-can-i-avoid-committi...
The work needed for the “I included something in a commit I want split out” [0] seems really complex, and it is something I do often.
Eg with stacked git (stg) this is just: goto, spill, and then refresh/create the stuff I want.
[0] https://docs.jj-vcs.dev/latest/faq/#i-accidentally-changed-f...
You can do that with just `jj split` too. The FAQ entry you linked to is for when you accidentally amended a commit and now you want to restore the bookmark to the old commit and move the changes you amended into a new commit on top instead.
I’m the same as the parent, auto-track = none() works perfectly for me
I'd been concerned about that initially, but setting up some gitgnores made this a complete non problem for me. .scratch/ for a lot, *.scratch, and ig-*.
It's also so easy to go back to the change latter and remove the files (after they're already copied elsewhere, or just operations log to go get) that it's really not a problem to just let stuff get in your commits.
In git there's such a strong incentive to do things right, to make clean commits. Imo one of the huge strengths of JJ is abandoning the obsession, and having far far far better tools to clean up after.
> In git there's such a strong incentive to do things right, to make clean commits.
There is no such. There are a lot of tools to manipulate commits and WIP, such as the stash, rebase, cherry pick, extracting and applying patch. You only need clean commits for review and the main branch because that helps the whole team. Your local copy can be as messy as you want to.
I started to use JJ during the summer, and now I'm hooked. It feels much easier to do things such as reorder, squash and split commits, as well as change commit message.
How easier than `git rebase -i`? Running this command, opens your editor of choice with this text & an extensive help commented out at the bottom:
You edit it to (due to help don't really have to remember a single command): And then after letting you reword 12ccd8a, edit 6bb5d98, write new messages for (post-edit) 6bb5d98&7e99e85, and af1f2fe&7567b18, you get: And if you messed up anything, you can always undo it by using your `git reflog`. No matter what you did, you can always go back a previous state! Each state is stored as new commit. Feel like git has a reputation for being hard even for things they're not that much.I didn't enjoy using JJ for the first day or two until I discovered jjui, now I do probably 95% of my interactions with jj through jjui.
Jjui is incredible. I keep shouting it from every rooftop that I find. So good, in fact, that I'd argue it should be made an official TUI
I really do want to learn and love it. It seems I love all the things which are told about it, but, I think JJ has a tutorial problem. I would really want something which focuses on concepts of it rather than workflows. May be some diagrams? I know that JJ-ists think that it is very easy to understand wall of cli printed text, with ascii trees and hash prefixes in bold, but it really isn't. Especially for target audience of tutorials (folks new to JJ).
https://jj-for-everyone.github.io is the most approachable jj tutorial I've seen. I wouldn't say it focuses on workflows, but it does take a "learn by doing" approach a bit more than the "data model first" approach it sounds like you might prefer.
It's still a young tool, it's not surprising that tutorials are a bit lacking (honestly there are surprisingly many for its age). Maybe be the change you want to see in the world and make one? (Which would be an... interesting... way to learn the tool for sure).
Same. It's how I learned Docker and Kubernetes, study the concepts, then I can ask "what's the specific command to do A,B,C" instead of an open ended "how do I do X".
Have you tried it yet? I found the tutorials a bit convoluted. But just giving it a go for a couple of days gave me more in practice than reading docs for a week could. It's not to say the docs couldn't be better - just maybe it's not as much of a barrier as you think.
Yes, I got lost when trying to sync with remote repo from two machines. I'll give it another try.