rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
11.11k stars 549 forks source link

Can developer's local branches inherit `--strip-blobs-bigger-than` or are they forced to clone the tidied branch? #273

Closed tylers-username closed 6 years ago

tylers-username commented 6 years ago

In the Usage Section the following is mentioned:

At this point, you're ready for everyone to ditch their old copies of the repo and do fresh clones of the nice, new pristine data.

Can I instead opt for everyone to git pull && git reflog expire --expire=now --all && git gc --prune=now --aggressive and get the same affect?

javabrett commented 6 years ago

One of the main benefits of getting everyone to clone-fresh is that you are guaranteed that nobody will have easy access to old/replaced histories containing the dirt you've removed. Anyone with active branches with WIP will need to move all the commits they have ahead of the newest commit in the remote to be atop the newly, rewritten histories.

For any work-in-progress I usually recommend developers be required to extract diffs/patches for any work ahead of what is in the remote, then apply those to the clean branches, resolving any conflicts.

Yes you could in-theory avoid a clean clone, but you do run the significant risk that developers will attempt to continue using local branches that contain WIP on the old history. If they try and merge any of those there will be an unholy mess and you may end-up back with the dirt. Not worth the risk IMHO.

tylers-username commented 6 years ago

Thanks!