Skip to content

fix: missing exclude patterns + GPG signing crash#4

Merged
FelixIsaac merged 1 commit into
mainfrom
felix/fix-exclude-patterns-and-gpg
May 23, 2026
Merged

fix: missing exclude patterns + GPG signing crash#4
FelixIsaac merged 1 commit into
mainfrom
felix/fix-exclude-patterns-and-gpg

Conversation

@FelixIsaac

Copy link
Copy Markdown
Owner

Problem

Two bugs causing real pain:

1. GPG signing crash on push
git.Commit() called git commit -m ... without overriding GPG signing. Any machine with commit.gpgsign=true globally (common on dev machines) crashes every push with gpg failed to sign the data.

2. Missing exclude patterns
Several directories/files were never excluded, causing them to be committed to the sync repo on every push:

Path Why it's junk
backups/ Auto .claude.json snapshots by CC — redundant with claude.json.age already synced
cache/ CC update/summary cache, ephemeral
chrome/ Machine-specific Chrome native host bat file
daemon/ Machine-specific pipe key
session-env/ Per-invocation env snapshots — 14,000+ files on an active machine
temp/ Temporary files
mcp-needs-auth-cache.json Ephemeral MCP auth state cache
scheduled_tasks.lock Runtime lock file
.last-cleanup Timestamp marker
*.lock All lock files (also catches tasks/**/.lock)

Fix

  • internal/config/config.go: Add missing patterns to DefaultExcludePatterns
  • internal/git/git.go: Pass -c commit.gpgsign=false in Commit() so it works regardless of global git config

Test

# Verify GPG bypass works
git config --global commit.gpgsign true
claude-code-sync push  # should no longer crash

# Verify excludes (dry run)
claude-code-sync push --dry-run  # backups/, session-env/ etc should not appear

- Add backups, cache, chrome, daemon, session-env, temp dirs to excludes
- Add mcp-needs-auth-cache.json, scheduled_tasks.lock, .last-cleanup, *.lock to excludes
- Fix git commit to pass -c commit.gpgsign=false so push works on machines with global GPG signing enabled
@FelixIsaac FelixIsaac merged commit c1e580b into main May 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant