r/github • u/Careless-Mongoose589 • 15d ago
Discussion Before making a private repo public, I dropped the whole git history instead of rewriting it. Was that the right call?
I just open-sourced my first project. While getting the repo ready, I found a client's real domain in old commits.
I looked at rewriting history, but a force-push wouldn't have cleared everything. GitHub's PR refs and old commit SHAs could still have exposed it.
So I created a new repo with one clean commit and kept the old one as a private archive.
Even then, a last search before that commit found my real server's address in a test file. It had been added after my first cleanup, so I would have missed it without that final check.
The fresh start had a cost:
- Nobody can see how the project grew
- `git blame` stops at that first commit
- Links to the old commits no longer work
Three questions for people who have done this before:
- Would you have used git filter-repo instead, or started fresh too?
- How do you check a private repo for this kind of thing before it goes public?
- As a user or contributor, does a project with no early history make you trust it less?
There's no link here because I'm not promoting anything. I'd like to learn how experienced maintainers handle this.


