Migrate from old LFS repo to new LFS repo?

前端 未结 2 1476
慢半拍i
慢半拍i 2021-02-15 16:03

There is LFS git repository hosted at Bitbucket server. Now we need to create new LFS repo and move repository there with LFS storage.

How to do this?


For

2条回答
  •  有刺的猬
    2021-02-15 16:29

    git remote add new NEW_REMOTE_REPO_URL 
    git push —-all NEW_REPO_URL
    

    Basically yes this will do what you want, but it would fail if you don't have all lfs data cached locally. To get it you should run before your commands:

    git lfs fetch --all
    

    PS: you could also run git lfs push --all new to only push lfs data, but git push will push them also, if the pre-push hook is set up

提交回复
热议问题