←back to thread

Jujutsu for everyone

(jj-for-everyone.github.io)
434 points Bogdanp | 3 comments | | HN request time: 0.824s | source
Show context
alabhyajindal ◴[] No.45084953[source]
I don't know anything about Jujutsu but the Git equivalents for some of these commands are more readable:

  jj bookmark move main --to @-
  git add . 

  jj git init --colocate
  git init
Also using `jj git` everytime feels repetitive.
replies(1): >>45085492 #
1. a022311 ◴[] No.45085492[source]
This feels like a troll, but I'll answer anyway.

The first command you mention is `jj bookmark move main --to @-`, which apart from the `@-` part, is easily read and does exactly what is written. It moves the main bookmark to the parent commit. The main difference to git here is that updating a branch is an explicit action. Jujutsu supports creating aliases and many users have a `jj tug` alias that moves the current closest branch to point to the parent commit. `git add .` just adds all changed files in the current directory to the current commit. That's an entirely different thing and Jujutsu takes care of doing that automatically.

The second command creates a git repository and while it is longer, I doubt the extra keystrokes will hurt you much. If it's too long, just alias it.

As for using `jj git`, since Jujutsu supports multiple backends, backend-specific commands require the `git` namespace. You generally only need it for cloning, pushing and fetching (with the option for aliases again). You'll rarely need to create a new repository or add a remote.

replies(1): >>45086258 #
2. alabhyajindal ◴[] No.45086258[source]
Thanks for your reply! I wasn't trying to be dismissive in my original comment. Just making an observation as someone new to Jujutsu.
replies(1): >>45086353 #
3. a022311 ◴[] No.45086353[source]
In that case, I apologize for treating your comment that way. Written text can make communicating intent so hard...