You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix deletion of committed files excluded in .gitignore, show branch info (#7)
* Fix deletion of committed files excluded in .gitignore, show branch info
* Add clickable branch links and support for remote branch/PR checkout
- Branch names in UI are now clickable and link to GitHub
- Added --remote-branch option to checkout remote branches
- Added --pr option to checkout specific PRs by number
- Fixed shadow repo sync to preserve git-tracked files regardless of gitignore
- Updated documentation with shadow repo sync principles
* Save work before checking out remote branch
* Checkpoint
* Checkpoint
* Checkpoint
Copy file name to clipboardExpand all lines: CLAUDE.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,17 @@ This is the Claude Code Sandbox project - a CLI tool that runs Claude Code insta
68
68
- Each session creates a new branch (`claude/[timestamp]`)
69
69
- Real-time commit monitoring with interactive review
70
70
71
+
### Shadow Repository Sync Principles
72
+
73
+
The shadow repository maintains a real-time sync with the container's workspace using the following principles:
74
+
75
+
1.**Git-tracked files take precedence**: Any file that is committed to the git repository will be synced to the shadow repo, regardless of whether it matches patterns in `.gitignore`
76
+
2.**Gitignore patterns apply to untracked files**: Files that are not committed to git but match `.gitignore` patterns will be excluded from sync
77
+
3.**Built-in exclusions**: Certain directories (`.git`, `node_modules`, `__pycache__`, etc.) are always excluded for performance and safety
78
+
4.**Rsync rule order**: Include rules for git-tracked files are processed before exclude rules, ensuring committed files are always preserved
79
+
80
+
This ensures that important data files (like corpora, model files, etc.) that are committed to the repository are never accidentally deleted during sync operations, even if they match common gitignore patterns like `*.zip` or `*.tar.gz`.
81
+
71
82
## Configuration
72
83
73
84
The tool looks for `claude-sandbox.config.json` in the working directory. Key options:
0 commit comments