admin管理员组

文章数量:1394991

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?

本文标签: git lfsGit LFSshould I run lfs push all if I have no lfsobjects directoryStack Overflow