Conversation
…ssue #176) Addresses the critical safety issue where users may assume concurrent git operations across multiple worktrees are safe. While worktrees safely isolate branches, git itself is not designed for concurrent operations. Changes: - README.md: Add prominent safety warning section after Features - docs/BEST_PRACTICES.md: New comprehensive guide covering: * Git's single-process design and concurrent operation risks * What's shared vs isolated in worktrees * Safe vs unsafe patterns with concrete examples * Common corruption scenarios and recovery procedures * AI agent coordination strategies - AGENTS.md: Add safety section at top with: * Critical safety rules for AI agent coordination * Safe vs unsafe workflows with examples * Tool-specific configuration (Claude Code, VS Code, Cursor) * Session management guidance - aw.sh: Add safety warning to help command output The documentation emphasizes that worktrees are safe for isolation, but running concurrent git commands (commit, rebase, push) across different worktrees can corrupt the shared .git/ data structures. Related issues: #174, #168, #170, #175 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive documentation to warn users about git's single-process limitation when using multiple worktrees. While worktrees safely isolate branches and working directories, git itself is not designed for concurrent operations, and running multiple git commands simultaneously across different worktrees can corrupt the repository.
This addresses a critical safety gap where users may assume that because worktrees allow multiple branches to be checked out simultaneously, it's safe to run git operations in parallel.
Changes
1. README.md - Prominent Safety Warning Section
2. docs/BEST_PRACTICES.md - Comprehensive Safety Guide (New File)
A 400+ line detailed guide covering:
3. AGENTS.md - AI Agent Safety Section
4. aw.sh - CLI Help Text Warning
Key Principles
The documentation emphasizes:
What's Shared vs Isolated
Shared across all worktrees (corruption risk):
.git/objects/- Object database.git/refs/- Branch references.git/config- Repository configuration.git/hooks/- Git hooksIsolated per worktree (safe):
.git/HEAD- Current branch pointer.git/index- Staging areaTesting
All validations passed:
Related Issues
Closes #176
Related to #174, #168, #170, #175
🤖 Generated with Claude Code