Introducing gitbutler-omz
Hi! I've been working on an Oh My Zsh plugin for GitButler:
π https://github.com/batuhan0sanli/gitbutler-omz
It currently provides three things:
-
50+ but CLI aliases β short, memorable shortcuts grouped by workflow
(bst, bbn, bcm, bcai, bp, bundo, β¦)
-
Git Protection Shield β wraps the git command and intercepts destructive
operations (add, commit, push, checkout, merge, rebase, stash,
cherry-pick, branch) while on gitbutler/workspace, prompting for
confirmation before proceeding.
-
Prompt integration β replaces the branch name in standard OMZ themes and
Powerlevel10k with live workspace metrics (active branch count, dirty state,
pending pushes).
I'm opening this issue to share the project and gather feedback from the team and
the community. Any thoughts are welcome!
Discussion topics
1. General suggestions
Are there any features, aliases, or shell integrations you'd like to see in a plugin
like this? Common workflows that feel awkward without a shortcut? Things the
protection shield should or shouldn't cover?
2. Overriding standard git/OMZ aliases
One area I'm considering β but unsure about β is overriding the well-known
Oh My Zsh git aliases to point to but equivalents. There are two levels of
this:
Level 1 β Simple command substitution
Map the familiar OMZ shorthand to the equivalent but command:
| OMZ alias |
Current behavior |
Proposed behavior |
gst |
git status |
but status |
gd |
git diff |
but diff |
gcmsg |
git commit -m |
but commit -m |
gp |
git push |
but push |
gl |
git pull |
but pull |
These are purely cosmetic redirects β same intent, different backend.
Level 2 β Behavioral overrides
Some aliases could go further and adapt the behavior to GitButler's model.
The most interesting example is gco (git checkout):
In vanilla git, gco my-feature switches your working tree to my-feature.
In GitButler, branches are applied/unapplied, not checked out. A faithful
equivalent would be:
- Unapply all currently applied branches
- Apply only
my-feature
This would let muscle memory carry over for users migrating from a traditional
git workflow, while keeping the underlying GitButler semantics intact.
Questions for the team / community:
- Is this kind of alias layering something you'd encourage or discourage?
- Are there edge cases in the
gco-style behavioral override that make it
dangerous (e.g. uncommitted changes, stacked branches)?
- Would it make more sense to ship these as an opt-in flag rather than the default?
Introducing gitbutler-omz
Hi! I've been working on an Oh My Zsh plugin for GitButler:
π https://github.com/batuhan0sanli/gitbutler-omz
It currently provides three things:
50+
butCLI aliases β short, memorable shortcuts grouped by workflow(
bst,bbn,bcm,bcai,bp,bundo, β¦)Git Protection Shield β wraps the
gitcommand and intercepts destructiveoperations (
add,commit,push,checkout,merge,rebase,stash,cherry-pick,branch) while ongitbutler/workspace, prompting forconfirmation before proceeding.
Prompt integration β replaces the branch name in standard OMZ themes and
Powerlevel10k with live workspace metrics (active branch count, dirty state,
pending pushes).
I'm opening this issue to share the project and gather feedback from the team and
the community. Any thoughts are welcome!
Discussion topics
1. General suggestions
Are there any features, aliases, or shell integrations you'd like to see in a plugin
like this? Common workflows that feel awkward without a shortcut? Things the
protection shield should or shouldn't cover?
2. Overriding standard git/OMZ aliases
One area I'm considering β but unsure about β is overriding the well-known
Oh My Zsh
gitaliases to point tobutequivalents. There are two levels ofthis:
Level 1 β Simple command substitution
Map the familiar OMZ shorthand to the equivalent
butcommand:gstgit statusbut statusgdgit diffbut diffgcmsggit commit -mbut commit -mgpgit pushbut pushglgit pullbut pullThese are purely cosmetic redirects β same intent, different backend.
Level 2 β Behavioral overrides
Some aliases could go further and adapt the behavior to GitButler's model.
The most interesting example is
gco(git checkout):In vanilla git,
gco my-featureswitches your working tree tomy-feature.In GitButler, branches are applied/unapplied, not checked out. A faithful
equivalent would be:
my-featureThis would let muscle memory carry over for users migrating from a traditional
git workflow, while keeping the underlying GitButler semantics intact.
Questions for the team / community:
gco-style behavioral override that make itdangerous (e.g. uncommitted changes, stacked branches)?