GitButler Code
Sign in Create an account

Actually social coding.

Work on one branch with a teammate or an agent. Everyone keeps their own head, so no push overwrites anyone. When your work diverges, grit puts it back together, or shows you the options.

Create an account Read the grit share docs

Everyone has their own head.

A shared branch lives in every member's space, and only you move your head. Everyone else's comes down beside it as origin/shared/feature/alice, read-only. There's nothing to force.

GitButler Code feature, shared by schacon: one head per member share log: every head ever pushed S schacon 538e7ad A alice 1c3e9a0 F factory 2b12f15 push yoursfetch all push yoursfetch all push yoursfetch all schacon's clone feature538e7ad origin/shared/feature/alice1c3e9a0 origin/shared/feature/factory2b12f15 alice's clone feature1c3e9a0 origin/shared/feature/schacon538e7ad origin/shared/feature/factory2b12f15 factory's clone feature2b12f15 origin/shared/feature/schacon538e7ad origin/shared/feature/alice1c3e9a0
Push yours, fetch everyone's. grit status shows the other heads under your branch, and pushing after an amend needs no --force.
You hear when they push
Get an email when someone's head moves, or turn it off in your settings.
Nothing is ever lost
Every head anyone pushes is kept on the server, even ones a decision later leaves out.
Git underneath
Teammates on plain git can join too, and see the same heads.

Sync puts heads together.

grit sync fast-forwards you to any head that builds on yours. When heads differ but nothing would be lost, it combines them, and the other person's next sync catches up.

These go through on their own:

  • added_both
  • rewrote_one
  • amended_both_compatible
  • amended_different
  • amended_one_reordered_other
  • rebased_one
  • rebased_both
  • dropped_one
  • dropped_both
  • split_one
  • split_one_amended_other
  • squashed_one_added_other
  • squashed_one_amended_other
Before Add client Parse response, amended Parse response Retry you alice rewrote_one After grit sync Add client Parse response, amended Retry you alice, next sync
Commits are tracked by change id, so an amend, reword, split or squash is recognized as what it is.

When it can't, you choose.

If combining would lose a change, like two edits to the same lines, grit stops. It shows what each of you did, commit by commit, and what each option would leave out.

Agents get the same report as JSON, and a clear exit code:

  • amended_both_conflicting
  • added_both_conflict
  • dropped_one_amended_other
  • reordered_both
  • split_both
  • split_one_amended_other_spanning
  • squashed_both_differently
  • reset_one
  • merge_commit
  • no_change_ids
feature your head and alice's amended_both_conflicting
Diverged. You both changed Parse response. Nothing is lost.
CommitYoualice
Add clientunchangedunchanged
Parse responseamendedamended
Retry on timeoutnew—
keep_bothrecommendedHer version, then yours on top.keeps everything
keep_theirsHer version only.drops your changes
resolveFix it by hand.yours to decide
grit share resolve feature keep_both --with alice

Accidents stay where they happen.

A bad reset, pushed, doesn't spread. Everyone else's sync stops instead of following it, their commits stay put, and one command puts the branch back.

  1. factory resets and pushes

    Its head drops six commits and adds one new one.

  2. alice's sync stops

    Sync reports reset_one. Her branch keeps all seven.

  3. One command restores it

    grit share resolve feature restore --with factory

    All seven commits, plus factory's new one on top.

Share the branch, not the history.

Give a contractor or an agent just the branch and the paths they need, on one snapshot of main. The rest of the project and its history stay on the server.

grit share add feature bob --path src/rpc

alice/widget the real history bob/widget bob's copy main 1,204 commits feature README.md docs/ src/rpc/ src/web/ main one snapshot commit feature README.md src/rpc/ Nothing else, not even in history. main is read-only for bob. bob's push, grafted back
bob's commits are grafted back onto the real history, so everyone else gets full commits. A push that would undo files outside his paths stays with him.

Bring in anyone.

People and agents join the same way. Anyone on a branch can add others, and each gets their own copy.

By name
Anyone with an account. They get an email.
grit share add feature alice
By email
No account yet? They get an invite that works for 30 days.
grit share add feature sam@example.com
By link
Anyone signed in can accept it. You set the uses and expiry.
grit share add feature --link --uses 5
Agents
An agent gets its own head, and stops for you when a decision is needed.
grit share add feature factory

When it lands, the share is over.

grit integrate merges the branch once everyone's work is in it, and ends the share. Push to it again later and grit asks what you meant:

rebase

Move just the new commits onto main, as your own branch.

rename

It's new work after all. Give it another name.

reshare

Share it again with the same people, and keep going.

Share your first branch.

Push a branch, then name who you want on it.

grit share add <branch> <user>
Create an account Everything else in GitButler Code