Jujutsu – a new version control system

Who needs a new VCS when there is already Git, Mercurial, SVN, Perforce, Darcs and others? The author of the Jujutsu project believes that there is still room for improvement. Meet – Martin von Zweigberg from Google is working on the project Jujutsuor for short jj.

Pros:

Incredibly flexible work with commits and branches. Main difference jj from Git is that the commit history is a sequence of patches, not snapshots. Idea taken from Darcs. This approach makes it easy to rewrite the commit history, rebase becomes trivial, commits (patches) can be easily moved between branches, there are fewer conflicts (automatic conflict resolution works better than in Git or Mercurial).

For example, you have a history of commits, but one commit “Create file A” should not be in the history. jj's approach is that all commits after the “bad” one need to be moved (rebase) to “Initial commit”. To do this, you need to change the link to the parent with the command jj rebase -s yyltlwtl --destination krpsnnrr.

If you specify not one, but 2 or more as a parent commit, then jj will kill these branches. Did you accidentally merge the wrong branch? It's OK. Do a rebase, specifying only one parent, thereby unmerging the branches.

You can switch to an old commit, change files, change a comment, and then revert to the most recent commit. Changes in history will be automatically updated.

Cancel any action. All changes in the repository can be rolled back. There is as simple jj undo and the full history of your actions on the repository jj op log.

Supports reading and writing to Git remote. You can try importing your pet-project and playing with the commits

Written in Rust. This is noticeable in the speed of operation and ease of installation: download one binary and add it to PATH. True, this causes a problem with GIT+SSH. More on this below.

Console-centric. The jj utility makes working in the console pleasant. The commit history looks nice. jj diff Conveniently highlights file changes directly in the console.

Cons:

Lack of an analogue of git stage. All changes to the working copy files are automatically committed. You cannot commit some of the local changes, leaving other changes hanging in the working committee. Authors jj recommend create a separate private branch, prohibiting it from being uploaded to the server. All local changes should be made in a private branch, merging it with the last commit, and undoing the merge before sending it to the server.

It's not clear which flow to use. You can continue to use git flow. But I think it’s worth inventing new, more flexible rules for working with branches, features and releases in jj.

There is no support for private key authorization via SSH. Jujutsu does not use OpenSSH installed on the system. Instead jj linked with libgit2. So he ignores ~/.ssh/config. On this occasion there is issue on Github.

No support for git submodules. But the developers have planhow to add them.

Jujutsu has not yet reached version 1.0, but has already managed to surprise with its ideas and approach to VCS. Definitely worth a try, at least for personal use. Main problem jj the same as Mercurial, Bazaar and others – they are not Git. Many are already hooked on Github/Gitlab and cannot easily switch to jj. The tools and infrastructure around Git make it an industry standard.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *