首页 > 解决方案 > 如何使用 GIT-LFS 重写 GIT 历史记录以跟踪整个目录

问题描述

我尝试了很多命令,但它不起作用:

java -jar bfg-1.13.0.jar --convert-to-git-lfs 'lib/**' --no-blob-protection
java -jar bfg-1.13.0.jar --convert-to-git-lfs 'lib' --no-blob-protection
java -jar bfg-1.13.0.jar --convert-to-git-lfs 'lib/*' --no-blob-protection 
java -jar bfg-1.13.0.jar --convert-to-git-lfs '*/lib/*' --no-blob-protection

BFG repo 清洁器是否支持它?如果是这样,命令是什么?

标签: git-lfsbfg-repo-cleaner

解决方案


我设法做到了这一点git lfs migrate import --include 'lib/**'。它创建了正确.gitattributes的,因此 git 将很好地处理您未来的克隆、拉取、签出和提交操作。


推荐阅读