A Better Merge Workflow with Jujutsu
A new merge workflow using Jujutsu, a modern VCS compatible with Git, introduces The Austin™ Mega Merge Strategy®. It simplifies merge commits, amending commits, and selecting commits efficiently, enhancing collaboration and code review processes with advanced commit graph manipulation.
Read original articleThis article discusses a new merge workflow using Jujutsu, a modern Version Control System (VCS) tool compatible with Git repositories. The workflow, known as The Austin™ Mega Merge Strategy®, allows for manipulating merge commits efficiently. Jujutsu introduces unique concepts like separate changes and commits, simplifying operations like amending commits. It also features revsets for selecting commits based on properties and eliminates the index by using working copy commits. The article explains creating a new merge commit, adding new parents, rebasing all parents, and the benefits of this workflow, such as testing multiple features together and quick bug fixes. Jujutsu's advanced capabilities in manipulating the commit graph make it stand out compared to Git, ensuring a safe and recoverable merging process. The workflow is particularly useful for managing multiple branches and commits simultaneously, enhancing collaboration and code review processes.
Related
A specification for adding human/machine readable meaning to commit messages
The Conventional Commits specification simplifies commit messages for clarity and automation. It categorizes changes, aids in generating changelogs, and promotes organized development practices without strict case sensitivity requirements.
I kind of like rebasing
People debate Git workflows, favoring rebasing for a linear history. Redowan Delowar prefers rebasing to consolidate changes and maintain a clean commit history. They discuss interactive rebasing benefits, squashing commits, handling conflicts, and offer practical tips.
Git Workflows for API Technical Writers
Technical writers encounter challenges in maintaining API documentation aligned with evolving designs. Git workflows provide version control and collaboration benefits. Strategies like merging copy improvements, code annotations, and OpenAPI overlays enhance documentation quality. Involving writers in API design ensures user-centric content. Storing docs in separate repositories can resolve Git conflicts.
My .gitconfig File Dissected
The article delves into .gitconfig file breakdown, covering user details, GPG key signing, Git aliases, and workflow optimization tips. Encourages readers to customize their .gitconfig for enhanced Git usage.
Git: Please Stop Squash Merging
Lucas Seiki Oshiro explains the drawbacks of squash merging in Git, debunking the belief that it condenses changes effectively. He clarifies Git's inner workings and the implications of squash merging.
GG, a GUI for Jujutsu - https://news.ycombinator.com/item?id=39713896 - March 2024 (2 comments)
jj init – getting serious about replacing Git with Jujutsu - https://news.ycombinator.com/item?id=39232456 - Feb 2024 (110 comments)
Jujutsu: A Git-compatible DVCS that is both simple and powerful - https://news.ycombinator.com/item?id=36952796 - Aug 2023 (261 comments)
Jujutsu: A Git-compatible DVCS that is both simple and powerful - https://news.ycombinator.com/item?id=36371138 - June 2023 (1 comment)
Jujutsu – A Git-compatible DVCS that is both simple and powerful - https://news.ycombinator.com/item?id=30398662 - Feb 2022 (228 comments)
I need to clean-up both my local clone and the central server from the branches which contain changes that have been fully merged
Can Jujutsu help with that task? If not, any other solution?
Besides the mentioned lack of blame functionality[1], things like path filtering (`git log -- <PATH>`), file-following with rename detection (`git log --follow -- <FILE>`), pickaxe (`git log -S <CODE>`), and range evolution (`git log -L<START>,<END>:<FILE>`) are missing. These tools have all become pretty indispensable to me in my day-to-day work since I've learned them, and I know I can still use them since jj can use Git as a backend, but I don't think I could adopt a tool that doesn't have them as first-class features.
Do any regular users of Jujutsu have thoughts on this?
[1] https://github.com/martinvonz/jj?tab=readme-ov-file#status
This is confusing to me, though to be fair I'm a "git expert" by trade. If you're amending a commit surely the "change" has changed so the change ID should also change? If the "change" isn't tracking the actual changes then what could it be tracking?
Overall I think this is just more confusing than using git but I think it's cool that people are building alternative clients. That's definitely the way to go if you want adoption.
Making history manipulation easier seems like a bit of a recipe for disaster given my experience training people. That old XKCD about git comes to mind and honestly that's where most people stay, if you bother to learn it then things like Jujitsu are probably harder to use for you. If you aren't interested in learning git to that level then I doubt you want / need something like Jujitsu.
For those curious the "multiple branches" at a time thing they're selling can be done with git, IMO easily, using worktrees: https://git-scm.com/docs/git-worktree
There are files that are committed to repository that I need to edit (e.g. .envrc files, which cannot be overridden). There is no way I can ignore those in Jujutsu.
In plain git I can do sparse checkout using negative paths and it works. jj doesn’t support it, and using positive path doesn’t work as I never know if new files are there.
Every push was a dance around removing my changes. I’m checking if there’s progress from time to time but there’s no so far.
But just yesterday I decided to check git branchless as I’m exploring stacked PR workflow and I can say it’s intriguing and even if more rough around the edges than jj I haven’t yet found any showstoppers.
It occurred to me I could just do the same 'manually' or with some git aliases to help, but I haven't, and I'm glad I've seen this (and the reminder to try out jj in general) because it's certainly far nearer than it would be in pure git.
Related
A specification for adding human/machine readable meaning to commit messages
The Conventional Commits specification simplifies commit messages for clarity and automation. It categorizes changes, aids in generating changelogs, and promotes organized development practices without strict case sensitivity requirements.
I kind of like rebasing
People debate Git workflows, favoring rebasing for a linear history. Redowan Delowar prefers rebasing to consolidate changes and maintain a clean commit history. They discuss interactive rebasing benefits, squashing commits, handling conflicts, and offer practical tips.
Git Workflows for API Technical Writers
Technical writers encounter challenges in maintaining API documentation aligned with evolving designs. Git workflows provide version control and collaboration benefits. Strategies like merging copy improvements, code annotations, and OpenAPI overlays enhance documentation quality. Involving writers in API design ensures user-centric content. Storing docs in separate repositories can resolve Git conflicts.
My .gitconfig File Dissected
The article delves into .gitconfig file breakdown, covering user details, GPG key signing, Git aliases, and workflow optimization tips. Encourages readers to customize their .gitconfig for enhanced Git usage.
Git: Please Stop Squash Merging
Lucas Seiki Oshiro explains the drawbacks of squash merging in Git, debunking the belief that it condenses changes effectively. He clarifies Git's inner workings and the implications of squash merging.