tags:

views:

368

answers:

2

I accidentally committed some large test wav files into my repository and they are using up a lot of space on my Github account. How can I remove these files from the history?

Note: these files were committed some time ago and are not on the HEAD commit.

+2  A: 
  1. Remove it from your local history on the branch where you committed it. One way to do that is using git commit --amend if it is your HEAD commit; another is git rebase --interactive.
  2. Force push the updated branch to github.

    git push --force github
    

    (where github is the name of your remote for GitHub).

This will remove it from the active history. To actually reclaim the space, GitHub will need to do a garbage collection. I'm not sure a way to do that explicitly, if they don't do it automatically. You may need to file a support request.

Emil
GitHub garbage collects after every repository operation.
Jörg W Mittag
+3  A: 
Jefromi