If I push a bad initial commit (or more than one) to a remote repository and want to just clear it / destroy it - can I do it by a command?
It's important to totally remove it from server so it doesn't use disk space.
E.G. Today I pushed a whole Visual Studio project with included dlls, sdfs and so on. Firstly this files are quite big, secondly some of them are modified by VS of other developers and than can't be merged. This made me google a little bit and I found out these files should be ignored. But the first commit already clutters my repository. I want to remove this and free the disk space.
It's possible to remove git repo and add it again via host's website (assembla), but this doesn't sound like solution to me.. Is there a more professional way?
UPDATE:
I tried suggestions from the answer below but it didn't work: 'git push -f' 'git push --force' 'git push origin -f' 'git push origin --force' resulted in:
$ git push --force
Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19), 6.85 KiB, done.
Total 19 (delta 3), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull fir
)
To git@git.assembla.com:xxxxx.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@git.assembla.com:xxxxx.git'