35

Using git for a project, I accidentally added to a commit a big .zip file. I didn't notice until I started uploading it to github. When I noticed, I hit ctrl-c, git remove, git commit and uploaded it again (now with the file untracked).

I know that this wasn't the right choice to do, because once I committed the .zip, it stays in the repo until I revert the commit, but sadly I didn't.

Now, when someone tries to download from the repo, it takes a lot of time to do it, sometimes yields git the remote end hung up unexpectedly (which I've read can be solved by doing some git config) and is very annoying.

My point is: is there a way to tell further pull/fetch request that forget this specific file in this specific commit version?

4

2 に答える 2

4

「BFG Repo-Cleaner」と呼ばれるツールがあり、github.com で filter-branch の代替として言及されています https://help.github.com/articles/remove-sensitive-data/

ツールのページへのリンクhttps://rtyley.github.io/bfg-repo-cleaner/

于 2015-05-28T12:10:09.087 に答える