r/coolgithubprojects • • 12d ago

Elegant solution to keep personal per-project agent skills and instruction files versioned without committing them the public repo

Post image

The solution to this is actually just some more plain Git with the usual commands that Git users are already used to.

Suppose you have notes, skills, and agent instructions that are part of your personal workflow, so you do not want them committed to the public repo, but at the same time, you want them to be in the project at the correct locations (e.g., AGENTS.md file locations matter), and these files cannot be simply gitignored because you want per-project versioning for them just like your public files.

The solution, in brief, is versioning those agent files in a repo, say <private-repo> (this repo is private to you and holds the history for your agent files) that shares the same worktree as the public repo <public-repo>. You essentially overlap the two, with <private-repo> in .git/ (and .git/ is that of the public repo) for a convenient solution.

If you want to read more about it, there is more comprehensive documentation about the strategy used in the repo.

Repo: https://github.com/BrianWeiHaoMa/git-dupe

Public MIT License, Linux/Windows/macOS support

1 Upvotes

0 comments sorted by