Skip to content
Strata v1.2.6

2026-05-09: Fix release script fails due to src-tauri/ in root .gitignore

Fix: release script fails due to src-tauri/ in root .gitignore

Section titled “Fix: release script fails due to src-tauri/ in root .gitignore”

npm run release -- 1.0.0 fails at the git add step:

The following paths are ignored by one of your .gitignore files:
src-tauri
hint: Use -f if you really want to add them.
Error: Command failed: git add package.json backend/package.json front/package.json
docs/package.json src-tauri/Cargo.toml src-tauri/tauri.conf.json

The root .gitignore contained src-tauri/ (the entire directory). This caused git add src-tauri/Cargo.toml src-tauri/tauri.conf.json to fail — git refuses to stage files in an ignored path without -f.

However, src-tauri/ source files (61 files: Rust code, configs, icons) are tracked in git. The 5.3 GB on disk is Rust build artifacts under src-tauri/target/, which were already correctly excluded by src-tauri/.gitignore:

# Generated by Cargo
/target/
/gen/schemas

The root .gitignore entry src-tauri/ was incorrectly excluding the entire directory instead of only build artifacts.

Replaced in root .gitignore:

# Before (wrong — excludes all source files)
# Tauri
src-tauri/
# After (correct — excludes only build artifacts)
# Tauri build artifacts (source files are tracked; artifacts excluded by src-tauri/.gitignore)
src-tauri/target/
src-tauri/gen/
#ConventionStatus
1Documentation update✅ Plan doc created; no user-facing docs reference this gitignore rule
2All 4 test gates✅ N/A — gitignore fix, no logic change
3Self-review✅ Done
4Endpoint coverage✅ N/A
5Bug-to-Test✅ N/A — release script; shell test out of scope
6Seed isolation✅ N/A
7Transaction invariants✅ N/A
8Plan history✅ This file
9Infra test gate✅ Verified with dry-run
10Environment compat✅ N/A
11Do-no-harm baseline✅ 61 tracked files unaffected; gitignore rules don’t retroactively untrack
12Plan execution summarySee below
13Doc grep✅ All src-tauri/ refs in docs point to source files, not gitignore rules

Commit: (see release commit chore: release v1.0.0)

  • .gitignore: replaced src-tauri/ with src-tauri/target/ + src-tauri/gen/
  • docs/src/content/docs/plans/2026-05-fix-release-gitignore.md: this file
  • 6 version files bumped to 1.0.0: package.json, backend/package.json, front/package.json, docs/package.json, src-tauri/Cargo.toml, src-tauri/tauri.conf.json

None. Plan followed exactly.

GateResult
Backend unit⏭ skipped (not affected)
Backend e2e⏭ skipped (not affected)
Frontend unit⏭ skipped (not affected)
Frontend e2e⏭ skipped (not affected)
Release dry-run✅ passed
  • The root .gitignore had src-tauri/ as a single line under # Tauri comment, likely added by someone intending to exclude only build artifacts. The src-tauri/.gitignore already handled that correctly.
  • 61 source files were tracked before the wrong ignore rule was added (or were force-added). Gitignore rules don’t retroactively untrack files, which is why git ls-files src-tauri/ showed 61 entries even with the bad rule in place.
  • The version files (Cargo.toml, tauri.conf.json) were already bumped by the failed release run, so after fixing .gitignore, only a git add + git commit was needed to complete the release.