DevTrends开发者趋势
主题色

brianweihaoma /

git-dupe

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 t…

DT软件开发DTAgent 能力扩展DTAgent 管理与编排DTSkill / 插件DTLinuxDTmacOSDTWindows

关于

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&#x2F; $ git dupe init # private repo Initialized empty Git repository in &#x2F;home&#x2F;brian&#x2F;code&#x2F;project&#x2F;.git&#x2F;dupe&#x2F; $ git dupe add notes&#x2F; AGENTS.md # private repo hint: notes is now hidden from the project&#x27;s Git; run from the root, &#x27;git dupe unhide -- notes&#x27; 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&#x2F;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&#x2F; (and .git&#x2F; 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.

收录记录

  1. Show HN

    2026年11月10日 · 1 次收录

讨论这个产品