从旧的LFS repo迁移到新的LFS repo? [英] Migrate from old LFS repo to new LFS repo?
问题描述
如何做到这一点?
例如,对于正常的回购,我们可以这样做:
git remote添加新NEW_REMOTE_REPO_URL
git push --all NEW_REPO_URL
是否将LFS存储与所有历史记录一起创建用于新回购?
git remote add new NEW_REMOTE_REPO_URL
git push --all NEW_REPO_URL
基本上可以这样做你想要,但如果你没有在本地缓存所有的lfs数据,它会失败。为了得到它,你应该在你的命令之前运行:
git lfs fetch --all
PS:您也可以运行 git lfs push --all new
来只推送lfs数据,但是 git push
如果设置了预推送
钩子,它们也会推送它们。 $ b
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 example for normal repo we can do:
git remote add new NEW_REMOTE_REPO_URL
git push —-all NEW_REPO_URL
Will LFS storage be created with all history for new repo?
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
这篇关于从旧的LFS repo迁移到新的LFS repo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!