That will only remove all git related information without modifying the source code (be sure to have the latest version of it though). git folder entirely (as if your code wasn’t versionned in the first place).
You’d then have two commits: one referencing a state with the sensitive data, the other referencing a state without them and all this would have been for nothing.īut I thought of something else that should work and involves deleting the. Removing this sensitive data and committing would only add another commit on top of the truncated history. You’re absolutely right, that’s my mistake it’s -depth that should be used to clone without history, as you pinpointed.Īlas, I don’t think my previous message’s instructions would actually work Because even though the history would not be cloned, you’d end up with a repo that have one commit, the last of the history, that would reference a state of your project with the sensitive data. I thought a “bare” clone has all the history, but just doesn’t have a working dir?