sh 转换git repo以使用git lfs
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 转换git repo以使用git lfs相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# May not always work. In that case use convert_repo_to_lfs
bfg --convert-to-git-lfs '*.fla' --no-blob-protection
#!/bin/bash
# Try convert_repo_to_lfs_bfg.sh first
git filter-branch --prune-empty --tree-filter '
git lfs track "*.fla"
git lfs track "*.mov"
git add .gitattributes
git ls-files -z | xargs -0 git check-attr filter | grep "filter: lfs" | sed -E "s/(.*): filter: lfs/\1/" | tr "\n" "\0" | while read -r -d $'"'\0'"' file; do
echo "Processing ${file}"
git rm -f --cached "${file}"
echo "Adding $file lfs style"
git add -f "${file}"
done
' --tag-name-filter cat -- --all
以上是关于sh 转换git repo以使用git lfs的主要内容,如果未能解决你的问题,请参考以下文章