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
10.86k stars 535 forks source link

convert-to-git-lfs stopped working #371

Open isonil opened 4 years ago

isonil commented 4 years ago

I'm using this tutorial to rewrite git history to convert files of the specified format to use git LFS, but it looks like even the simplest case doesn't work: https://confluence.atlassian.com/bitbucket/use-bfg-to-migrate-a-repo-to-git-lfs-834233484.html

--convert-to-git-lfs just doesn't update any commits. No matter which type of quotes I use (as suggested here: https://stackoverflow.com/questions/44550842/unable-to-convert-git-repo-to-use-large-file-support-lfs-via-the-bfg-tool )

How to repro: Create a new repo on bitbucket, commit and push 1 exe file Run git clone --mirror Install git lfs Run java -jar "/bfg-1.13.0.jar" --convert-to-git-lfs "*.{exe,dll}" --no-blob-protection reponame.git Observe the error: BFG aborting: No refs to update - no dirty commits found??

This is what I get:

Cleaning
--------

Found 8 commits
Cleaning commits:       100% (8/8)
Cleaning commits completed in 109 ms.

BFG aborting: No refs to update - no dirty commits found??
ymartin59 commented 4 years ago

You are probably facing this issue #349

dagillespie commented 4 years ago

I'm also facing exactly the same issue. Is there a fix?

isonil commented 4 years ago

I'm also facing exactly the same issue. Is there a fix?

You can use git lfs migrate out of the box now: git lfs migrate import --include="*.extension" --everything

dagillespie commented 4 years ago

Thanks!