svn to git migration不存在的大文件

时间:2016-05-20 09:18:35

标签: git svn

我使用svn-git导入SVN存储库

svn2git/bin/svn2git http://svn.domain.ltd.uk/svn/dev/ECMC --username pingg

当试图推送到github时,它会抱怨文件大小,

 [kshk@localhost#] git push --set-upstream origin master
Counting objects: 206115, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (49987/49987), done.
Writing objects: 100% (206115/206115), 441.62 MiB | 5.01 MiB/s, done.
Total 206115 (delta 109860), reused 195000 (delta 109594)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: df39ad042c3f6d4103db7f474334f862
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File cloud/StoreStockIndexer/data/StockData.txt is 134.53 MB; this exceeds GitHub's file size limit of 100.00 MB
To git@github.com:myrepo-ag/myrepo.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:myrepo-ag/myrepo.git'

但是,此文件cloud/StoreStockIndexer/data/StockData.txt在存储库中不存在,也不存在于SVN存储库中。

这可能是由于腐败的svn-git迁移造成的吗?

我已将文件添加到```.gitignore``但是这也不起作用...有任何关于修复此问题的想法吗?

1 个答案:

答案 0 :(得分:1)

如果该文件已经在某个时间点被检入SVN并在之后被删除,那么git中将会有一个提交对象。你可以使用bfg 如有必要,将其删除:

bfg --delete-files cloud/StoreStockIndexer/data/StockData.txt  myrepo.git