Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following works, repeatably, in reducing the repository down to around 2.5MB .git and 5.8MB in total. It includes the suggestions made by @jamessan above.</p> <p>This removes the objects from all branches and pushes those removals to a remote repository. That remote repository is then entirely free of these objects as far as I can tell (by the repository size dropping so dramatically.)</p> <pre><code># Configure the repository to push all existing branches &amp; tags # when none are explicitly specified git config --add remote.origin.push '+refs/tags/*:refs/tags/*' git config --add remote.origin.push '+refs/heads/*:refs/heads/*' # Make sure all local branches exist, so they get filtered for remote_branch in `git branch --all | grep -v HEAD | sed -e 's/\*//'`; do local_branch=`echo $remote_branch | sed -e 's!remotes/origin/!!'`; git checkout $local_branch; done # Prevent git &lt;1.7.7.1 from complaining about dirty working directory git update-index -q --ignore-submodules --refresh # Do the filtering across --all branches and rewrite tags # Note that this will necessarily remove signatures on tags git filter-branch -f --tree-filter "git rm -rf --ignore-unmatch modules/custom/mymigration/data/photos/*" --tag-name-filter cat -- --all # Remove the backed-up refs git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d # Clear out the reflog and garbage-collect git reflog expire --expire=now --all git gc --aggressive --prune=now # Push all changes to origin - pushes tags and branches git push origin </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload