I was working on a project and commited all changes to my local branch. When I tried to push to github I got denied because one of the new files created on my repo was over the default filesize limit. Now even if I remove the offending file and do a new commit I can't push to the repo, since a version of that file is on my branch history.
How can I remove this file from the existing commit without losing all changes done to other files?
I'm thinking of branching the previous commit, merging both except for the new file, but I'm not experienced enough to do it with confidence, so if anyone is willing to write out a step by step I'd appreciate it.
Thanks!