0

I'm facing a problem of watermarking my work. I want to provide my work to my customers using git repository but with benefits of a doubt. I know how to watermark my work but the question is how to do it per user.

Is there a way to modify content of git clone that it will differ for particular user?

My first thought was to somehow provide different version of single commit for each user but there are couple problems with this solution. First I do not know how to do it and second it is probably not reliable solution as it will be easy to find this commit and change it.

Do you have any idea of how to resolve this issue?

Logman
  • 4,031
  • 1
  • 23
  • 35

1 Answers1

1

Is there a way to modify content of git clone that it will differ for particular user?

The short answer is: No, it's not possible.


The long answer is: To reliable modify the contents of a git clone in a way that cannot be undone by just removing the last commit as you describe, would require you to have a lot of control over the Git server where the repository is being cloned from, and be able to intercept the clone operation and takeover.

It's probably best if you create a separate Git repository for each client, that contains a single commit flattening the whole history and with the contents already watermarked, and allow the client to clone that repository, instead of the original one with all the history.

Of course, this repository will have no relation with the original one, so might not satisfy your needs, if you wanted the client to contribute back in the repo - i.e. it wouldn't be easy to merge the client's changes back to the original one.

C. Augusto Proiete
  • 24,684
  • 2
  • 63
  • 91
  • That's what I was afraid of. Now I thinking of creating single branch for every customer and merge watermarked content with main branch on that branch. That should provide at least basic level of security without preventing customers from contributing. – Logman Jan 19 '18 at 20:00
  • This would only work if **a)** You have a way to guarantee that the customer can only see & download their specific branch and **b)** it must be an orphaned branch that has no parent commit in the main branch (i.e. it should not be possible to see the history in the main branch) – C. Augusto Proiete Jan 22 '18 at 19:57