开发者

CVS and Git Deletion with Extreme Prejudice

Suppose that long ago somebody placed an important piece of Personally Identifiable Information in the comments of some source code.

Suppose further that the source code lived in a still active CVS repository, and that this repo was in turn imported into a Git repository (and a few clones, naturally) at some point开发者_如何学Python.

In this nightmare scenario, are any of the following solutions available in either CVS or Git:

  • Delete files from repositories completely, so that old versions with the PII cannot be checked out, or

  • Modify all past revisions so that the PII was replaced with X's, say?

I have a feeling it might be possible with CVS, and probably not at all in Git, but I'm not sure.

Thanks for your help.


For git, I think it's rather easy, because you are free to edit all history (on repositories, you have write access too, obviously, i.e. the clones of course will stay as are until they are updated again and garbage-collected). See here:

http://help.github.com/remove-sensitive-data/

I guess, for CVS, you can even work directly on the RCS files but I am not very experienced with CVS.

Addition: as it's not about removing some files but basically changing some files "before they were ever comitted", it might already be enough to do a git rebase -i and edit those commits that introduced PII. You will probably need to fix some conflicts in the commits that later removed the PII but I guess, that's ok. The advantage is that you only need to fix those commits that actually introduced/changed the PII.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜