mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
fix(project): add backups/ to .skillshare/.gitignore managed dirs
Project mode agent backup (sync --agents, backup -p) creates .skillshare/backups/ but it was not gitignored — backup artifacts could be accidentally committed. Agent backup was added in95c46ca8(2026-04-06), after the gitignore fix in90c096b8(2026-03-16) which only covered logs/ and trash/.
This commit is contained in:
@@ -553,7 +553,7 @@ func ensureProjectGitignore(root string, gitignoreConfig bool) error {
|
||||
}
|
||||
|
||||
// Always ignore operational directories to avoid committing noise.
|
||||
if err := install.UpdateGitIgnoreBatch(gitignoreDir, []string{"logs", "trash"}); err != nil {
|
||||
if err := install.UpdateGitIgnoreBatch(gitignoreDir, []string{"logs", "trash", "backups"}); err != nil {
|
||||
return fmt.Errorf("failed to update .skillshare/.gitignore: %w", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ skillshare install anthropics/skills -s pdf --into tools -p
|
||||
Remote skills are:
|
||||
- Installed to `.skillshare/skills/<name>/` (or `.skillshare/skills/<into>/<name>/` with `--into`)
|
||||
- Recorded in `.skillshare/config.yaml` under `skills:`
|
||||
- Added to `.skillshare/.gitignore` (cloned content not committed; `logs/` and `trash/` are ignored by default)
|
||||
- Added to `.skillshare/.gitignore` (cloned content not committed; `logs/`, `trash/`, and `backups/` are ignored by default)
|
||||
|
||||
### Step 4: Sync to Targets
|
||||
|
||||
@@ -107,12 +107,13 @@ git commit -m "Add project-level skills"
|
||||
|
||||
**What gets committed:**
|
||||
- `.skillshare/config.yaml` — targets and remote skill list
|
||||
- `.skillshare/.gitignore` — ignore patterns for project logs, trash, and cloned skills
|
||||
- `.skillshare/.gitignore` — ignore patterns for project logs, trash, backups, and cloned skills
|
||||
- `.skillshare/skills/<local-skills>/` — local skill content
|
||||
|
||||
**What's ignored:**
|
||||
- `.skillshare/logs/` (operation and audit logs)
|
||||
- `.skillshare/trash/` (soft-deleted skills, auto-cleaned after 7 days)
|
||||
- `.skillshare/backups/` (agent backups from sync and backup commands)
|
||||
- Remote skill directories (re-installed from config)
|
||||
|
||||
### Optional: Commit Log Files
|
||||
|
||||
@@ -87,7 +87,7 @@ skillshare sync -g # Force global mode
|
||||
├── .skillshare/
|
||||
│ ├── config.yaml # Targets + settings (incl. extras)
|
||||
│ ├── .metadata.json # Remote skills list (auto-managed)
|
||||
│ ├── .gitignore # Ignores logs/, trash/, and cloned remote/tracked skill dirs
|
||||
│ ├── .gitignore # Ignores logs/, trash/, backups/, and cloned remote/tracked skill dirs
|
||||
│ ├── extras/ # Extras source directories
|
||||
│ │ └── rules/ # e.g. extras init rules --target .claude/rules -p
|
||||
│ │ └── coding.md
|
||||
@@ -176,7 +176,7 @@ Project mode has some intentional limitations:
|
||||
| Merge sync mode | ✓ | Default, per-skill symlinks |
|
||||
| Copy sync mode | ✓ | Per-target via `skillshare target <name> --mode copy -p` |
|
||||
| Symlink sync mode | ✓ | Per-target via `skillshare target <name> --mode symlink -p` |
|
||||
| `--track` repos | ✓ | Cloned to `.skillshare/skills/_repo/`, added to `.gitignore` (`logs/` and `trash/` are also ignored by default) |
|
||||
| `--track` repos | ✓ | Cloned to `.skillshare/skills/_repo/`, added to `.gitignore` (`logs/`, `trash/`, and `backups/` are also ignored by default) |
|
||||
| `--discover` | ✓ | Detect and add new targets to existing project config |
|
||||
| `push` / `pull` | ✗ | Use git directly on the project repo |
|
||||
| `collect` | ✓ | Collect local skills from project targets to `.skillshare/skills/` |
|
||||
|
||||
@@ -152,7 +152,7 @@ skillshare uninstall _team-skills
|
||||
|
||||
## Project Mode
|
||||
|
||||
Tracked repos also work in project mode. The repo is cloned into `.skillshare/skills/` and added to `.skillshare/.gitignore` (so the tracked repo's git history doesn't conflict with your project's git). Project logs (`.skillshare/logs/`) and trash (`.skillshare/trash/`) are also ignored by default.
|
||||
Tracked repos also work in project mode. The repo is cloned into `.skillshare/skills/` and added to `.skillshare/.gitignore` (so the tracked repo's git history doesn't conflict with your project's git). Project logs (`.skillshare/logs/`), trash (`.skillshare/trash/`), and backups (`.skillshare/backups/`) are also ignored by default.
|
||||
|
||||
Installing a tracked repo auto-records `tracked: true` in `.skillshare/.metadata.json`, so new team members get the correct clone behavior via `skillshare install -p`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user