Trying out #Jujutsu 😎

So far, I like the general philosophy. I just miss the pre-commit hooks (I know about jj fix, but it’s not the same), and I still got to get my head round some stuff that break a decades-long culture of doing version control.

https://www.jj-vcs.dev/latest/

Jujutsu docs

Day one impressions on #Jujutsu

🚀 Jumping in is fine and does not break git -- if you accept to live in detached HEAD off main
🚀 Working in a amend-oriented flow is simpler with jj
🚀 rebasing is a breeze
🚀 It’s fun to push branch B while editing branch A - no hassle checking out stuff
🚀 Saying goodbye to stashes is cool too
🚀 There is an emacs mode 😍

But...
💥 I find the jj log is a little messy - I know it can be cleaned
💥 Farewell pre-commit hooks
💥 Muscle memory is resilient...

Day one has ended and I am still shyly tip-toeing my way through the #jj commands.

You really gotta unplug your old habits and join a whole new VC paradigm.

As a nushell / zellij / emacs user, #JuJutsu is one more tool in my one-of-a-kind dev combo.

Why do things the boring way when you can make it fun?
@MoskitoHero mmmm. Lot of people talk about it recently. I need to find some Time to play with it. If i undersyand well it is compatible with got, I mena can I use it while other team member use regular git ?

@djtal64 That’s exactly what I am doing now.

Jujutsu is a versioning system that can be backed by all sorts of existing VCS, and obviously, git is a first-class citizen.

What happens is that you get a new .jj directory in your repo alongside your .git directory.

From then on, you work on a detached HEAD. The equivalent of branches are bookmarks.

Check this out: https://docs.jj-vcs.dev/latest/github/

Also watch that video for the general idea: https://youtu.be/2otjrTzRfVk?si=HzZzUWOjw64GORyR

Working with GitHub - Jujutsu docs

@MoskitoHero Making the default “jj" command do log the way I wanted log was likely my first config change and custom template. Now I have

[ui]
default-command = ["log", "-T", "log_with_files", "--limit", "7"]

[aliases]
la = ["log", "-r", "all()"]
ll = ["log", "-r", "all()", "--limit", "15"]
lad = [ "la", "-T", "log_with_description" ]
lld = [ "ll", "-T", "log_with_description" ]
lag = [ "la", "-T", "log_for_grep" ]

and can see myself adding more in the future.

@marchyman nice, I have already set up a few aliases, but did not know you could override the default log subcommand.
Will try yours and probably keep a few. Thanks!

@MoskitoHero The templates I use (and the rest of my config) can be seen here:

https://gist.github.com/marchyman/d926adfa2aebb701ee1c5a47b3b221e2

I really don't know what I’m doing and mostly cut and paste from system templates making minimum modifications as desired.

JJ config

JJ config. GitHub Gist: instantly share code, notes, and snippets.

Gist
@MoskitoHero nice! Which emacs mode do you use? Majitsu?

@ianthetechie I am trying Majitsu and jj-mode

I have them set up but I have decided to stick to the CLI for now so that I can explore the possibilities and get a better idea of the general philosophy before I abstract it with an emacs mode.

But Majitsu feels a little more feature-complete.