Each lock file is a plain text file recording the holder's identity with PID, timestamp, operation type, and hostname fields that enable liveness checks and diagnostics when a lock appears stale or is held longer than expected: Source
GitButler
GitButler is a commercially backed company. The team includes Scott Chacon and a full engineering team. The project is funded as a product, not a volunteer effort. Sebastian Thiel (gitoxide creator) contracts for GitButler to integrate gitoxide into their backend. Source
Package main
Package main is the entry point for the safegit CLI, a concurrency-safe git wrapper that isolates commits via per-invocation temporary indexes. Source
safegit
safegit is the required git wrapper for Claude Code sessions that share a worktree. The core problem: when multiple AI agent sessions run git commit concurrently, they race on .git/index, causing files to leak between commits. safegit solves this with per-invocation temporary indexes and CAS-retry ref updates. Source
This
This is the most common case. Each session runs safegit commit -m "message" -- file1 file2 with its own files. The commits are serialized by the per-branch lock, and CAS retry ensures each commit builds on the latest branch tip. All commits land in linear order with no lost files. Source