GitButler 0.23 - "Air Jordan"
Today we released GitButler 0.23, which includes some pretty amazing new functionality. Here's a rundown of the major things that have landed since 0.22.3.
No more gitbutler/workspace (mostly)
This has been a big annoyance for a while now.
Whenever you are working in a git repository with GitButler, we have switched you into a branch called gitbutler/workspace that has a merge commit on top of it that all parallel branches are automatically merged into. This is because we want a normal git status call to show what is expected, even with work committed on multiple branches.
However, if you only have a single branch in your workspace, it's unneccesary and annoying. The 0.23 release removes this issue. Now if you are on a single branch, you can use GitButler and not have to worry about that weird integration commit.
This also removes the need to run but setup to get into "gitbutler" mode. Just run GitButler anywhere and it won't mess with your HEAD.
I say "mostly" because if you do add more parallel branches, we will still add the gitbutler/workspace integration commit, but when you're back down to one it will be removed again.
Worktrees
This release adds new worktree support, which means now you can use parallel branches in your main workspace, have isolated branches in a seperate worktree directory, or all of the above.
This gives GitButler the flexibility to use any branching strategy to get your work done:
- Parallel branches to work on unrelated things in a single working directory with shared resources and artifacts
- Stacked branches to work on related things in seperately reviewable changes
- Worktree branches (or stacked worktree branches) to isolate changes from each other for testing or best-of-N type problems
gix0.90, with a roughly 35% faster object database.- Faster refreshes in Git LFS repositories and after undo, and faster workspace updates in repositories with many pack files.
- SHA-256 repositories now support commit signing, rewording, undo and push.
- Commit signing honors more Git settings, including X.509 signing and
gpg.ssh.defaultKeyCommand. - Workspace update previews no longer sign their temporary commits, and a failed preview signature no longer turns signing off.
Work can be easily and seamlessly moved between worktrees and your main workspace and back. This means that individual changes, commits or whole branches can move between these areas with a simple but move command.
We also support a .worktreeinclude file, which will copy ignored files or directories into new worktrees. What's more, if your filesystem supports copy on write cloning, we will do that too. So go ahead and copy your Rust project's target/ directory to each worktree for faster builds.
Worktrees also support undoing, just like work in your main workspace.
Here's the whole loop in a small Rust project, with a humidity branch already in the main checkout.
The CLI
There are also a number of new commands and capabilities in the GitButler but CLI.
It used to be a little awkward to initialize a new project as a git repository and start using GitButler to manage it. Now there is a but init command to do that for you.
There is also a new but split command that can take hunks out of a commit and extract them into a new commit anywhere in your stack.
Speaking of hunks, but diff now shows stable hunk IDs that can be moved around, discarded, squashed or split out from within a commit or file.
Projects now use a local target branch, so but pull and but merge can work in repositories with no remote. This used to be a big issue trying to use GitButler in new repositories when you hadn't pushed them somewhere. Now you can have your target branch be something like a local main rather than needing it to be origin/main. but pull also moves a checked-out target branch along with it automatically.
One final small change - the uncommitted area's ID is now @ instead of zz.
Here's most of that in one go: a brand new repository with no remote, a commit that turns out to be two commits, and a merge.
The TUI
The TUI also got a lot of love in the last few months.
Obviously, it also gained worktree support so you can create, discard, archive (remove from the view without deleting) or unarchive a project's worktrees.
It can also now mark, move, squash and discard committed hunks in the details view.
Also lots of other cool things - you can use the mouse-wheel and click rows to select. You can move a commit's files to another commit, a branch or a new branch. In move mode, b moves commits onto a new branch above the selected one. Cherry-pick commits onto new unstacked branches. The list goes on.
Under the hood
Of course, also lots of bug fixes and cool smaller details.
Early look: GitButler Native
Just one more thing.
We have been experimenting with a native GPUI based GUI to replace the Tauri based desktop app. It's incredibly fast, sports a brand new multi-project layout, and does nearly everything our current desktop app does.
If you would like to try it out, you can switch to this new interface in the settings under Experimental.
Restart the app and you'll be using the new UI. You can easily switch back.
Play with all this 0.23 goodness today and let us know what you think!