The repository of an open-source Apache 2.0 licensed project I'm forking is huge and has a giant commit history, so, for the sake of saving space, I want to just to squash all commits, preserving all the file structure and, of course, the license and contributors list.

Is it an OK action? From what I read and deduced it's totally fine - the license is about the product itself, not about the commit history. Still, I want to be 100% sure.

1 Answer 1


In a nutshell, the Apache license allows you to modify the source code as long as you document your changes. You could view squashing the commits as such a change, and document it by stating something like "This project is forked from XYZ, with commit history .. squashed".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.