Back to browse
GitHub Repository

Share Claude Code sessions across a team through an orphan git branch (npm: claude-git-sessions)

0 starsTypeScript

Ccgs – Collaborative Claude Code sessions, stored in Git branches

by scrollaway·Jun 6, 2026·5 points·1 comment

AI Analysis

●●SolidBig BrainSolve My Problem

Git plumbing ops store sessions in orphan branches without touching your working tree.

Strengths
  • Surgical path rewriting edits only structural cwd field, not blind find-and-replace
  • Uses git hash-object and commit-tree against throwaway index, safe with dirty trees
  • Branch namespacing lets you keep private WIP sessions separate from shared team sessions
Weaknesses
  • Niche audience limited to Claude Code users, which narrows adoption potential
  • No web UI for browsing sessions, CLI-only workflow may friction for some teams
Target Audience

Teams using Claude Code for collaborative development

Post Description

My team uses Claude Code daily, and the sessions have become some of the most useful artifacts we produce. But they're trapped in ~/.claude/projects/ on whichever laptop they happened on. There's no good way to hand a colleague "the session where I untangled the migration" so they can claude --resume it and keep going from where I left off. Enter ccgs: Share Claude Code sessions through an orphan branch (@ccgs/<name>) in your existing repo's remote

- Session files carry the author's absolute paths. On pull, ccgs rewrites the working dir back to your path so resume actually works — surgically editing only the structural cwd field, not a blind find-and-replace that would happily corrupt the transcript.

- Everything goes through git plumbing (hash-object/commit-tree/update-ref) against a throwaway index. It never touches your working tree, index, or current branch, and it's fine with a dirty tree. It will not git checkout something behind your back.

To try it without installing: `npx claude-git-sessions`. This also incidentally allows you to move a directory and carry the claude code transcripts with it (just push first, then move the directory, then pull)

IMPORTANT CAVEAT: Unless you have a very good security hygiene, your Claude Code sessions are likely full of sensitive information such as environment secrets. Use with caution and avoid using on public repositories. Branches used by ccgs are prefixed by `@ccgs/` so you can easily filter them out.

This project was written by and with Claude Code. This Show HN was not.

(Reposted with URL fixed)

Similar Projects