1

I have a function that I call somewhere within my classes that looks like this:

RLP.Unlock("User ID", new byte[] { ... });

The data is per-user information provided by the hardware manufacturers, which essentially says that whatever you use the feature for is not their problem. But I digress.

Recently, I accidentally committed code with this line to a public GIT repository. This doesn't concern me enough to rewrite the history, but I'd be interested to know how I can pull this section of code out from the rest so that it doesn't appear in future commits.

To be clear, I'm looking for a way of storing the two sensitive pieces of data somewhere other than in this class, so that I can add them to git-ignore, while still sharing the rest of the class.

Eric
  • 95,302
  • 53
  • 242
  • 374

1 Answers1

3

I would recommend that you factor this data out into a separate datafile provided as input to the application, then track that one datafile in a separate git repository. Git itself is not designed for masking out parts of a repository, and all kinds of madness will result if you try to force things to work that way.

bdonlan
  • 224,562
  • 31
  • 268
  • 324