git lfs - Git LFS - should I run lfs push --all if I have no lfsobjects directory? - Stack Overflow

I run backup of multiple repos using two steps:i) git lfs fetch --allii) git clone --bareNow when I

I run backup of multiple repos using two steps:

i) git lfs fetch --all

ii) git clone --bare

Now when I want to restore multiple repos, I run it via 2 commands (all automated):

i) if .git/lfs/objects exists

      git lfs push <URL> --object-id `find lfs/objects/ -type f -printf "%f "`

else

      git lfs push --all

ii) git push --mirror

I identified for large repos that do not even use lfs, git lfs push --all takes a lot of time (atleast 1 hour or more for about 3 million git objects). git push --mirror completes within 5 minutes.

Now since I run restore of lot of repos at same time, Can I skip the else case "git lfs push --all" if I do not have objects directory at all inside my .git/lfs folder??

This can increase the repo upload performance by a lot.

But will this cause any isses leading to corrupted repositories after upload?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744110526a4558932.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信