I accidentally committed a large zip file and pushed to bitbucket.
Now, I have already added the file to
git rm --cached
Because you only have one commit on top of the commit containing the large binary file, you might be able to avoid an interactive rebase.
First, nuke the second commit you made removing the large binary file:
git reset --hard HEAD~1
This leaves you in exactly the state you were when you had just committed the large binary file.
Now, at this point the large binary file should again appear locally. Delete this file, then add that change to the index if Git has not already done that for you.
Finally, amend the bad commit via:
git commit --amend
To push this branch to Bitbucket you will have to force push because you rewrote the history:
git push --force origin feature
Keep in mind that force pushing rewrites the remote history, which can cause problems for anyone else sharing this branch. In your case, the benefits of doing this probably outweight having an enormous binary being part of your history.