Hacker News new | ask | show | jobs
Ask HN: How do you handle OSS project with private artifacts?
2 points by mrsalty 16 days ago
Hi, I don't have a long history as OSS builder but I'm now focusing on a project which is keeping me busy and I want to maintain it in the long term.

The problem I'm facing is that I have the OSS part (code, public docs, etc) but also some private assets (private docs primarily, my personal notes, AI iterations, etc) which I don't want to push publicly. At the same time I don't want to keep the private stuff local only as they are valuable assets and they might get lost, so gitignore is not a solution.

So I am now maintaining 2 repos, one private and one public, I push to private then with a script I copy over (public) assets into the public one. But this is a lot of overhead and it's giving me headaches for many reasons.

Have you ever faced this before? What could be a smooth solution?

Cheers

2 comments

I’d keep the private repo as the source of truth and automate a one-way subtree split to the public repo;manual copying invites drift and accidental leaks.
Why not just two non-overlapping repos?
that's my current setup, but it requires quite some manual work. Especially when I want to release. ie I commit and push to private repo, create PR with summary, merge. Then I run the script to copy over files to public repo (skipping files listed in a custom .publicignore file), then manually commit to public repo (I have to copy over commit messages and PR summaries from private repo), then push and release on public. It's a bit exahusting, and when something drifts it becomes a hell to keep them both in sync.
My suggestion was to keep one repo with the docs and a separate repo with the code, and zero intersection.

I teletransported commits from one repo to another with "git format-patch" and "git am" or something like that. I never remember the magic spell. If you do that too often, you may automate it in a script.

thanks, I will try that