Hello, I’m testing Unity Version Control today to see if it fits my needs. I’ve been facing issues with git LFS because popular hosting providers don’t automatically prune LFS objects that are orphaned after squash commits resulting in bloated repositories from unused binaries.
My question is pretty simple, how do I squash multiple commits like in git? Use case is that when I develop on a feature, I operate on a binary file multiple times. The commits are useful in case I do something wrong and I rollback, but after I complete the feature, I want to flatten the commit changes so that I can save on repository storage. I won’t ever need the previous versions of the binary file (during the commits in development of the feature).
For example:
- Commit 5: modify scene to add lights
- Commit 6: modify scene to add colliders
- Commit 7: modify scene to fix a bug
- Commit 8: modify scene with updated script (already complete for this feature)
I want to flatten the commits so that everything from commit 5 to 8 is merged into one commit, and the scene file is modified as if only once.
I’ve been scouring the docs but can’t find anything about it. Is there a recommended approach for this?