Can I undo the last git push?
- by Stray
A team member accidentally pushed half a gig of unwanted zips to the remote repo last night when they were in a rush. Yes... oops.
Nobody has pulled or committed since.
Ideally I want to just 'undo' what happened.
I have looked at filter-branch and was thinking of trying something like
git filter-branch --tree-filter 'rm -f *.zip' HEAD
but that would be local, and I can't figure out how to do it direct on the remote repo.
Is there a simpler way to undo what happened? If she amends her last commit and pushes again will that undo the push - ie actually remove those files from the history?
Obviously if she deletes them, commits and pushes again then that still leaves the content in the repo, which is no good.