Hi HN!
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 workspace at the correct locations (e.g., AGENTS.md file locations matter), and these files cannot be simply gitignored because you also want versioning for them.
The solution to this is actually just a bit more plain Git.
$ git status --short # public repo
?? AGENTS.md
?? notes/
$ git dupe init # private repo
Initialized empty Git repository in /home/brian/code/project/.git/dupe/
$ git dupe add notes/ AGENTS.md # private repo
hint: notes is now hidden from the project's Git; run from the root, 'git dupe unhide -- notes' stops hiding it
$ git dupe commit -m "Notes and agent instructions" # private repo
[main (root-commit) 3eb3af9] Notes and agent instructions
3 files changed, 3 insertions(+)
create mode 100644 .gitdupe
create mode 100644 AGENTS.md
create mode 100644 notes/todo.md
$ git status --short # public repo: nothing
$ git dupe log --oneline # private repo: your files
3eb3af9 Notes and agent instructions
The solution, in short, 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), and that repo shares the same worktree as the public repo <public-repo>. You essentially overlap the two, with <private-repo> put in .git/ (and .git/ is that of the public repo) for a convenient solution.
If you want to read more about the strategy used, there is more comprehensive documentation in the repo.
git-dupe supports macOS, Linux, and Windows and is under the MIT License.
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 workspace at the correct locations (e.g., AGENTS.md file locations matter), and these files cannot be simply gitignored because you also want versioning for them.
The solution to this is actually just a bit more plain Git.
The solution, in short, 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), and that repo shares the same worktree as the public repo <public-repo>. You essentially overlap the two, with <private-repo> put in .git/ (and .git/ is that of the public repo) for a convenient solution.If you want to read more about the strategy used, there is more comprehensive documentation in the repo.
git-dupe supports macOS, Linux, and Windows and is under the MIT License.