Bad fix for git

Ok, about 700 comm. back (> 30 days) I accidentally saved the ThirdParty / mapper / Songbird_1.2.0-1146_windows-i686-msvc8.exe file (iTunes download type) in my local Git repository, without noticing that I also clicked on the remote hosted Git repository, I noticed that the other day the repo exceeded 200 mb, while I was expecting about 20 mb.

I followed the following instructions: http://github.com/guides/completely-remove-a-file-from-all-revisions

Besides launching Git gc --aggressive --prune, but the local directory remains over 200 MB. Before I can sort the remote repo, I need to sort my local one, is there something special in my case (i.e. a massive file, long ago fixed). How can I completely delete this file and bring the directory to the right size?

Note to avoid migration: I think this is more suitable for StackOverflow, since Git is primarily a tool for local developers at the moment, community support and not part of any major distributions or expectations of system administrators, that is, at those times when developers know the Git admin is the best.

+6
git
source share
1 answer

I wrote about a similar problem in "git: Subversion import reduction."

git filter-branch manpage contains a checklist for shrinking the repository, which recommends running filter-branch and then cloning to leave a crack.

Cloning with the file system path creates hard links, so use the URL:

 $ git clone file:///home/gbacon/src/dBTools.git 

Even after that, some large nameless droplets survived in the clone. Thanks to # git on freenode for the reflog excise proposal:

 $ git reflog expire --verbose --expire=0 --all $ git gc --prune=0 
+3
source share

All Articles