If you make such a commit but haven't pushed your changes to any other repository, then it's easy to get rid of it with git-rebase
or the more powerful git-filter-branch
. However, it sounds like you have already pushed these big files upstream.
If these changes have already been shared among many different repositories, especially those that have had further work applied to them, then this might be difficult to clean up without causing disruption. If the changes have not yet been widely shared, then you can use something like git-filter-branch
to process the "master" repository (whichever one that is) to remove the large files. Then, replace the old master repository with your newly crafted one and continue from that point. You may need be careful pulling changes from this new master repository into existing repositories, or just discard them and make a new clone.