In a project a author has not allowed us to publish his code/commits under a open source license, so we have to rewrite his parts. How can I remove all his commits/code from the Git history?
Asked
Active
Viewed 43 times
0
-
2Was the repository already under the license when those commits were added? If so, then I believe the author might not have a say any more, but that is besides the point of your question I guess. – Lasse V. Karlsen Jul 30 '20 at 13:22
-
2You can use [git filter-branch](https://git-scm.com/docs/git-filter-branch), but bear in mind that any work based on commits made by that author will result in conflicts when those commits are removed, so it might be some work to clean that up. – Lasse V. Karlsen Jul 30 '20 at 13:22
-
2Also, note that if this turns out to be a real legal issue, you also need to watch out for copy pasting. ie. author adds some code, someone on your team copies a few lines of code from that authors work to somewhere else, you then remove the original commit(s) introducing that code, but the copied code stays. The author might require that the copied code also be removed, and this would be far harder to find and do properly. – Lasse V. Karlsen Jul 30 '20 at 13:25
-
1Does this answer your question? [Remove all commits by author](https://stackoverflow.com/questions/39232800/remove-all-commits-by-author) – SwissCodeMen Jul 30 '20 at 14:01
-
@SwissCodeMen I have tried that, but it does not remove the changes/code from the author, but removes the commits. – tomwassing Jul 30 '20 at 16:54